Skip to main content
POST
Report the broadcast transaction of a prepared 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"

id
string
required
Example:

"5316911983139663"

Body

application/json

The transaction hash

txHash
string
required

Hash of the broadcast prepared transaction.

Pattern: ^0x[0-9a-fA-F]*$
Example:

"0xabc123"

Response

The order after the submission

id
string
required

Order id. A decimal string that fits in a 53-bit integer.

Pattern: ^[1-9]\d{0,15}$
Example:

"5316911983139663"

trader
string
required
Pattern: ^0x[0-9a-fA-F]{40}$
Example:

"0x73b3A111C5BCCf9086c97B96e0AbAad69Dc4f523"

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

Decimal number encoded as a string to preserve precision.

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

"0.5"

price
string | null
required

Decimal number encoded as a string to preserve precision.

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"

collateral
string
required
sl
string | null
required

Decimal number encoded as a string to preserve precision.

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

"0.5"

tp
string | null
required

Decimal number encoded as a string to preserve precision.

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

"0.5"

reduceOnly
boolean
required
slippage
string
required

Decimal number encoded as a string to preserve precision.

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

"0.5"

clientId
string | null
required
status
enum<string>
required
Available options:
prepared,
pending,
open,
filled,
rejected,
timed_out,
canceled,
expired
txHash
string | null
required
Pattern: ^0x[0-9a-fA-F]*$
Example:

"0xabc123"

expiresAt
integer | null
required

For prepared orders, when the prepared transaction stops being valid.

fill
object | null
required
reason
enum<string> | null
required
Available options:
NONE,
PAUSED,
MARKET_CLOSED,
SLIPPAGE,
TP_REACHED,
SL_REACHED,
EXPOSURE_LIMITS,
PRICE_IMPACT,
MAX_LEVERAGE,
NO_TRADE,
WRONG_TRADE,
NOT_HIT,
LIQ_REACHED,
OTHER,
null
createdAt
integer
required
updatedAt
integer
required