Skip to main content
POST
Place an order

Authorizations

X-Gains-Signature
string
header
required

EIP-712 signature by an authorised agent over {method, path, body, timestamp, nonce}, sent with X-Gains-Agent, X-Gains-Timestamp and X-Gains-Nonce.

Path Parameters

chain
enum<string>
required
Available options:
arbitrum,
base,
polygon,
megaeth,
arbitrum-sepolia
Example:

"arbitrum"

Body

application/json

The order

market
string
required

Gains market symbol, <base>/<quote>.

Pattern: ^[A-Z0-9.]{1,15}\/[A-Z0-9]{1,10}$
Example:

"BTC/USD"

side
enum<string>
required
Available options:
long,
short
type
enum<string>
required
Available options:
market,
limit,
stop
size
string
required

Position size in base asset units.

Pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
Example:

"0.5"

leverage
string
required

Decimal number encoded as a string to preserve precision.

Pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
Example:

"0.5"

price
string

Trigger price for limit/stop orders; expected price for market orders (defaults to the mark price).

Pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
Example:

"0.5"

collateral
string

Collateral symbol. Defaults to USDC where the chain lists it, otherwise to the chain's single active collateral.

sl
string

Decimal number encoded as a string to preserve precision.

Pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
Example:

"0.5"

tp
string

Decimal number encoded as a string to preserve precision.

Pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
Example:

"0.5"

reduceOnly
boolean

Defaults to false.

slippage
string

Maximum slippage in percent. Defaults to 1.

Pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
Example:

"0.5"

clientId
string
Required string length: 1 - 64

Response

The order, with its lifecycle id

order
object
required
transaction
object | null
required

Null when nothing has to reach the chain for this call.