For the complete documentation index, see llms.txt. This page is also available as Markdown.

Schema

Enums

Request fields whose restrictions say "use integer value of the enum" use the integer value. REST and WebSocket response fields use the corresponding status string unless stated otherwise.

OrderSideEnum

Status String
Integer Value
Description

BUY

1

Buy order

SELL

2

Sell order

OrderTypeEnum

Status String
Integer Value
Description

LIMIT

1

Limit order

MARKET

2

Market order

TimeInForceEnum

Status String
Integer Value
Description

GTC

1

Good Til Canceled. An order stays on the book unless canceled.

FOK

2

Fill or Kill (not supported yet). Expires if not fully filled immediately.

IOC

3

Immediate Or Cancel. Fills as much as possible before expiring.

GTX

4

Post Only. Expires if the order would be filled immediately.

TransferAssetTypeEnum

Status String
Integer Value
Description

EVM_DEPOSIT

0

Indicate this transfer is a deposit from the evm chain.

PERPS_DEPOSIT

1

Indicate this transfer is a deposit from the perps chain.

EVM_WITHDRAW

2

Indicate this transfer is a withdrawal to the evm chain.

PERPS_WITHDRAW

3

Indicate this transfer is a withdrawal to the perps chain.

INTERNAL

4

Indicate this transfer is an internal transfer.

SPOT_WITHDRAW

5

Indicate this transfer is a withdrawal to the spot chain.

SPOT_DEPOSIT

6

Indicate this transfer is a deposit to the spot chain.

APIKeyTypeEnum

Status String
Integer Value
Description

EVM

1

Use evm private key as secret key and evm address as public key.

APIKeyPermissionEnum

permissions is a bit mask. A bit value of 1 means the permission is disabled. If permissions is omitted, all permissions are enabled.

Status String
Bit Index
Bit Value
Description

TRADE

0

1

Place, replace, modify, and cancel orders; schedule cancels; update perps leverage, margin, and collateral.

CANCEL

1

2

Cancel orders and schedule cancels.

WITHDRAW

2

4

Withdraw from spot or perps to EVM or the other engine.

TRANSFER

3

8

Sub-account and internal transfers within spot or perps.

SignatureTypeEnum

Status String
Integer Value
Description

EIP712

1

EIP-712 signature with engine-specific domain.

EIP712_UNIVERSAL

2

EIP-712 signature with universal domain for cross-engine user actions such as AddAPIKey, AddPermissionedAPIKey, and ApproveBuilderFee.

OrderStatusEnum

Status String
Integer Value
Description

NEW

1

The order has been accepted into the engine.

PARTIALLY_FILLED

2

The order is partially filled in the engine.

FILLED

3

The order is fully filled in the engine.

CANCELED

4

The order has been canceled by the user.

REJECTED

5

The order has been rejected and was not processed.

EXPIRED

6

The order expired according to order rules (FOK, IOC, etc.)

TRIGGERED

10

perps only, for triggered TP/SL orders

DcaOrderStatusEnum

Status String
Integer Value
Description

ACTIVE

1

Waiting for or continuing scheduled executions.

CANCELLED

2

Cancelled by the user or system.

TERMINATED

3

Stopped after three consecutive execution failures.

PRUNED

4

Removed when the account state is pruned.

ExecutionTypeEnum

Status String
Integer Value
Description

NEW

1

The order has been accepted into the engine.

PARTIALLY_FILLED

2

The order is partially filled in the engine.

FILLED

3

The order is fully filled in the engine.

CANCELED

4

The order has been canceled by the user.

REJECTED

5

The order has been rejected and was not processed.

MODIFIED

6

The order has been modified, only reduce size.

EXPIRED

7

The order was canceled according to the order type's rules (e.g. LIMIT FOK orders with no fill, LIMIT IOC or MARKET orders that partially fill)

REPLACED

8

The order has been amended, both size and price changed.

OrderModifierEnum - perps only

Status String
Integer Value
Description

NORMAL

1

Normal order.

STOP

2

Stop order.

BRACKET

3

Normal order in order with TP/SL group.

ATTACHED_STOP

4

Stop order in order with TP/SL group.

MarginModeEnum - perps only

Status String
Integer Value
Description

ISOLATED

1

Isolated margin mode.

CROSS

2

Cross margin mode.

PositionSideEnum - perps only

Status String
Integer Value
Description

BOTH

1

Oneway mode.

LONG

2

Hedge mode. not supported in order placement yet

SHORT

3

Hedge mode. not supported in order placement yet

StopTypeEnum - perps only

Status String
Integer Value
Description

STOP_LOSS

1

Stop loss order.

TAKE_PROFIT

2

Take profit order.

TriggerTypeEnum - perps only

Status String
Integer Value
Description

LAST_PRICE

1

Trigger by last trade price. not supported in order placement yet

MARK_PRICE

2

Trigger by mark price.

INDEX_PRICE

3

Trigger by index price. not supported in order placement yet

Hex String

A string starts with 0x, the rest parts consist of 0 to 9, a to z and A to Z.

Decimal String

The canonical form of a decimal string is a standardized representation that removes ambiguity and allows for direct comparison. Key rules include removing the optional plus sign, prohibiting exponential notation, and ensuring there is at least one digit to the left and right of the decimal point.

Examples

Original String
Canonical Form
Reason

00123

123

Remove leading zeros.

+32.1

32.1

Remove the leading plus sign.

32.100

32.1

Remove trailing zeros.

0.500

0.5

Remove trailing zeros.

1.234e+2

123.4

Convert from exponential notation and remove trailing zeros.

001.230

1.23

Remove leading zeros and trailing zeros.

REST Types

Exchange Types

Common Types

BuilderParams

Builder parameters embedded in signed write requests.

Name
Type
Required
Restrictions
Description

id

uint64

true

non-zero

Builder account ID

fee

uint64

true

none

Requested builder fee rate in tenths of a basis point. 10 requests 1 bp of the fill notional. The actual rate is subject to the user's approval and the engine cap.

AddAPIKeyRequest

Name
Type
Required
Restrictions
Description

accountID

uint64

true

none

Target primary or subaccount ID

name

string

true

should match ^[0-9a-zA-Z_-]{1,36}$

Name of API key

type

APIKeyTypeEnum

true

use integer value of the enum

Type of API key

publicKey

HexString

true

none

Public key bytes in hex

expiresAt

uint64

true

none

Timestamp in milliseconds.

builder

BuilderParams

false

none

Optional builder fee approval to include with this API key.

AddPermissionedAPIKeyRequest

Use this request body to create an API key with selected permissions disabled. The builder field is not supported in this request. permissions must disable TRADE, CANCEL, or both; enabling both TRADE and CANCEL is not supported.

Name
Type
Required
Restrictions
Description

accountID

uint64

true

none

Target primary or subaccount ID

name

string

true

should match ^[0-9a-zA-Z_-]{1,36}$

Name of API key

type

APIKeyTypeEnum

true

use integer value of the enum

Type of API key

publicKey

HexString

true

valid EVM address

API key public key

expiresAt

uint64

true

none

Timestamp in milliseconds.

permissions

uint64

true

bit mask

Permission mask. A set bit disables the corresponding APIKeyPermissionEnum.

ApproveBuilderFeeRequest

Name
Type
Required
Restrictions
Description

accountID

uint64

true

none

Primary account ID of the user

builderID

uint64

true

non-zero

Builder account ID

maxFeeRate

uint64

true

0 to 2000

Maximum builder fee rate in tenths of basis points. 0 clears it. Spot orders are capped at 2000 (2%); Perps at 200 (0.2%).

RevokeAPIKeyRequest

Name
Type
Required
Restrictions
Description

accountID

uint64

true

none

Target primary or subaccount ID

name

string

true

should match ^[0-9a-zA-Z_-]{1,36}$

Name of the API key to revoke

TransferAssetRequest

Name
Type
Required
Restrictions
Description

id

uint64

true

none

The unique identifier for this transfer request.

fromAccountID

uint64

true

none

The account ID of sender.

toAccountID

uint64

true

none

The account ID of receiver.

coinID

uint64

true

none

The coinID to send.

amount

DecimalString

true

positive value

The amount of coin to send.

type

TransferAssetTypeEnum

true

use integer value of the enum

Type of transfer

ReplaceOrderRequest

Name
Type
Required
Restrictions
Description

accountID

uint64

true

none

The account ID

orders

Array<ReplaceParams>

true

non-empty

List of non-empty order replacement

ReplaceParams

Name
Type
Required
Restrictions
Description

symbolID

uint64

true

none

The symbol ID

clOrdID

string

true

should match ^[0-9a-zA-Z_-]{1,36}$

The unique identifier for this replacement request.

origOrderID

uint64

false

none

The unique identifier of the order to be replaced.

origClOrdID

string

false

should match ^[0-9a-zA-Z_-]{1,36}$

The client-provided identifier of the order to be replaced.

price

DecimalString

false

none

The new price for the order

quantity

DecimalString

false

none

The new quantity for the order

NewDcaOrderRequest

Shared by Spot and Perps. Spot plans require a USDC-quoted symbol.

Name
Type
Required
Restrictions
Description

accountID

uint64

true

non-zero

Primary account or sub-account that owns the plan and provides funds or margin.

symbolID

uint64

true

non-zero

Trading symbol ID; Spot requires USDC as the quote coin.

side

OrderSideEnum

true

1 (BUY), 2 (SELL)

Side of each child execution order.

amount

DecimalString

true

at least 10 USDC; canonical string; symbol limits and settlement precision apply

USDC notional for each BUY or SELL execution. See amount and funding for Spot and Perps behavior.

schedule

DcaSchedule

true

see below

Recurring UTC schedule.

minPrice

DecimalString

false

positive canonical string; <= maxPrice when both set

Inclusive lower bound on the reference price for attempting an execution.

maxPrice

DecimalString

false

positive canonical string; >= minPrice when both set

Inclusive upper bound on the reference price for attempting an execution.

randomize

bool

false

defaults to false; must be false for interval

Randomize calendar execution within the selected UTC hour. The amount stays fixed.

immediate

bool

false

defaults to false

Request an initial attempt without waiting for the scheduled time; later attempts follow schedule.

Price bounds use the order-book midpoint for Spot and mark price for Perps. See execution rules.

Include both boolean fields in signed parameters, even when false. See Authentication & Signing for serialization and signing.

DcaSchedule

Name
Type
Required
Description

kind

string

true

interval, daily, weekly, biweekly or monthly.

hour

uint32

true

Interval duration in hours for interval; UTC hour of day, 0–23, for calendar schedules. Include midnight as 0.

day

uint32

false

Provide a weekday for weekly/biweekly or day of month for monthly; omit for interval and daily.

Allowed hour and day values for each schedule kind:

kind

hour

day

interval

1, 4, 8, 12 hours

omitted

daily

0–23 UTC

omitted

weekly / biweekly

0–23 UTC

1–7, Monday=1, Sunday=7

monthly

0–23 UTC

1–31

See schedules and examples for execution timing.

CancelDcaOrderRequest

Name
Type
Required
Restrictions
Description

accountID

uint64

true

non-zero

Primary account or sub-account that owns the plan.

symbolID

uint64

true

non-zero

Trading symbol of the plan.

orderID

uint64

true

non-zero

Parent plan ID returned by creation or plan queries. Child execution order IDs cannot be used here.

ScheduleCancelRequest

Name
Type
Required
Restrictions
Description

accountID

uint64

true

none

The account ID

scheduledTimestamp

uint64

false

none

none

Spot only types

BatchNewOrderRequest

Name
Type
Required
Restrictions
Description

accountID

uint64

true

none

none

orders

Array<BatchNewOrderItem>

true

non-empty

List of non-empty orders

builder

BuilderParams

false

none

Optional builder for every order in the batch

BatchNewOrderItem

Name
Type
Required
Restrictions
Description

symbolID

uint64

true

none

none

clOrdID

string

true

should match ^[0-9a-zA-Z_-]{1,36}$

none

side

OrderSideEnum

true

use integer value of the enum

none

type

OrderTypeEnum

true

use integer value of the enum

none

timeInForce

TimeInForceEnum

true

use integer value of the enum

none

price

DecimalString

false

none

none

quantity

DecimalString

false

none

none

funds

DecimalString

false

none

market buy orders only

BatchCancelOrderRequest

Name
Type
Required
Restrictions
Description

accountID

uint64

true

none

none

cancels

Array<BatchCancelOrderItem>

true

non-empty

List of non-empty order cancellations

BatchCancelOrderItem

Name
Type
Required
Restrictions
Description

symbolID

uint64

true

none

none

clOrdID

string

true

should match ^[0-9a-zA-Z_-]{1,36}$

The unique identifier for this cancellation request.

orderID

uint64

false

none

The unique identifier of the order to be canceled.

origClOrdID

string

false

should match ^[0-9a-zA-Z_-]{1,36}$

The client-provided identifier of the order to be canceled.

NewTwapOrderRequest

Name
Type
Required
Restrictions
Description

accountID

uint64

true

none

The account ID

symbolID

uint64

true

none

Symbol ID

side

OrderSideEnum

true

use integer value of the enum

Order side

quantity

DecimalString

true

positive value

TWAP total quantity

minutes

uint64

true

5 to 1440

TWAP duration in minutes

randomize

bool

true

none

Whether to randomize slices

CancelTwapOrderRequest

Name
Type
Required
Restrictions
Description

accountID

uint64

true

none

The account ID

symbolID

uint64

true

none

Symbol ID

orderID

uint64

true

non-zero

TWAP order ID

Perps only types

PerpsNewOrderRequest

Name
Type
Required
Restrictions
Description

accountID

uint64

true

none

The account ID

symbolID

uint64

true

none

Symbol ID

orders

Array<PerpsOrderItem>

true

non-empty

List of orders to submit

builder

BuilderParams

false

none

Optional default builder for every order

PerpsOrderItem

Name
Type
Required
Restrictions
Description

clOrdID

string

true

should match ^[0-9a-zA-Z_-]{1,36}$

Client order ID (unique per account)

modifier

OrderModifierEnum

true

use integer value of the enum

Order modifier

side

OrderSideEnum

true

use integer value of the enum

Order side

type

OrderTypeEnum

true

use integer value of the enum

Order type

timeInForce

TimeInForceEnum

true

use integer value of the enum

Time in force

price

DecimalString

false

none

none

quantity

DecimalString

false

none

none

funds

DecimalString

false

none

Market buy orders only

stopPrice

DecimalString

false

none

Trigger price for TP/SL

stopType

StopTypeEnum

false

use integer value of the enum

Stop type for TP/SL

triggerType

TriggerTypeEnum

false

use integer value of the enum

For TP/SL; only MARK_PRICE supported

reduceOnly

bool

true

none

Reduce-only flag

positionSide

PositionSideEnum

true

use integer value of the enum

Only BOTH is supported

PerpsNewTwapOrderRequest

Name
Type
Required
Restrictions
Description

accountID

uint64

true

none

The account ID

symbolID

uint64

true

none

Symbol ID

side

OrderSideEnum

true

use integer value of the enum

Order side

quantity

DecimalString

true

positive value

TWAP total quantity

minutes

uint64

true

5 to 1440

TWAP duration in minutes

randomize

bool

true

none

Whether to randomize slices

reduceOnly

bool

true

none

Reduce-only flag

PerpsCancelOrderRequest

Name
Type
Required
Restrictions
Description

accountID

uint64

true

none

The account ID

cancels

Array<PerpsCancelItem>

true

non-empty

List of orders to cancel

PerpsCancelItem

Name
Type
Required
Restrictions
Description

symbolID

uint64

true

none

Symbol ID

orderID

uint64

false

none

The order ID to cancel

clOrdID

string

false

should match ^[0-9a-zA-Z_-]{1,36}$

The client order ID

ModifyOrderRequest

Name
Type
Required
Restrictions
Description

accountID

uint64

true

none

Account ID

symbolID

uint64

true

none

Symbol ID

orderID

uint64

false

none

Order to be replaced

clOrdID

string

false

should match ^[0-9a-zA-Z_-]{1,36}$

Client-provided identifier to replace

price

DecimalString

false

none

The new price

quantity

DecimalString

false

none

The new quantity

stopPrice

DecimalString

false

none

The new stop price

UpdateLeverageRequest

Name
Type
Required
Restrictions
Description

accountID

uint64

true

none

The account ID

symbolID

uint64

true

none

Symbol ID

leverage

uint32

true

none

Leverage level

marginMode

MarginModeEnum

true

use integer value of the enum

1=ISOLATED, 2=CROSS

UpdateMarginRequest

Name
Type
Required
Restrictions
Description

accountID

uint64

true

none

The account ID

symbolID

uint64

true

none

Symbol ID

amount

DecimalString

true

non-zero

Amount to add (positive) or remove (negative)

UpdateCollateralRequest

Testnet only. This request is currently supported on testnet environments only.

Name
Type
Required
Restrictions
Description

accountID

uint64

true

none

The account ID

coinID

uint64

true

non-USDC coin only

Coin ID of the collateral asset. 0 is rejected.

amount

DecimalString

true

non-zero, precision

Amount to add (positive) or remove (negative).

REST Response

Succeed Response

Properties

Name
Type
Required
Restrictions
Description

code

int32

true

none

Always 0

data

Object

true

none

Check format in each endpoint

timestamp

uint64

true

none

The timestamp in milliseconds when this response is just sent.

Examples

Error Response

Properties

Name
Type
Required
Restrictions
Description

code

int32

true

none

Error code. Always negative.

error

string

true

none

Error message

timestamp

uint64

true

none

The timestamp in milliseconds when this response is just sent.

Examples

User Rate Limit

UserRateLimit

Name
Type
Required
Description

userID

uint64

true

Internal user ID

cumulativeTxNum

uint64

true

Cumulative transaction/action count used for transaction quota

cumulativeCancelNum

uint64

true

Cumulative cancel count used for cancel quota

cumulativeVolume

DecimalString

true

Cumulative trading volume in USDC

transactionQuota

int64

true

Total transaction/action quota, including trading volume and base override

transactionQuotaUsed

uint64

true

Cumulative transactions/actions used

transactionQuotaRemaining

int64

true

Remaining transaction/action quota. Returns 0 when exhausted

transactionQuotaOverridden

bool

true

Whether a configured transaction limit override replaces the default base quota

cancelQuota

int64

true

Total cancel quota

cancelQuotaUsed

uint64

true

Cumulative cancels used

cancelQuotaRemaining

int64

true

Remaining cancel quota. Returns 0 when exhausted

Announcement

AnnouncementArticle

Name
Type
Required
Description

id

int64

true

Announcement ID

externalId

string

true

External announcement identifier

style

string

true

Announcement style

title

string

true

Announcement title

label_names

Array<string>

true

Announcement labels. Empty array when no labels.

startTime

int64

true

Start time in milliseconds

endTime

int64

true

End time in milliseconds

createdAt

int64

true

Creation time in milliseconds

updatedAt

int64

true

Last update time in milliseconds

AnnouncementList

Name
Type
Required
Description

articles

Array<AnnouncementArticle>

true

Announcement summaries

page

int

true

Current page number

size

int

true

Page size

count

int64

true

Total number of announcements

AnnouncementDetail

AnnouncementDetail includes all fields from AnnouncementArticle, plus:

Name
Type
Required
Description

body

string

true

Announcement body

Symbol

SpotSymbol

Name
Type
Required
Description

id

uint64

true

Unique symbol ID

name

string

true

Unique symbol name, e.g. vBTC_vUSDC

displayName

string

true

Display name for UI, e.g. BTC/USDC

baseCoinID

uint64

true

Base coin ID

baseCoin

string

false

Base coin name

baseCoinPrecision

uint8

false

Base coin precision

quoteCoinID

uint64

true

Quote coin ID

quoteCoin

string

false

Quote coin name

quoteCoinPrecision

uint8

false

Quote coin precision

pricePrecision

int32

true

Decimal precision of order price. Price filter parameters.

tickSize

DecimalString

true

Tick size of order price. Price filter parameters.

minPrice

DecimalString

true

Minimum order price. Price filter parameters.

maxPrice

DecimalString

true

Maximum order price. Price filter parameters.

quantityPrecision

int32

true

Decimal precision of order quantity. Lot size filter parameters.

stepSize

DecimalString

true

Step size of order quantity. Lot size filter parameters.

minQuantity

DecimalString

true

Minimum order quantity. Lot size filter parameters.

maxQuantity

DecimalString

true

Maximum order quantity. Lot size filter parameters.

marketMinQuantity

DecimalString

true

Minimum order quantity in market order. Market lot size filter parameters.

marketMaxQuantity

DecimalString

true

Maximum order quantity in market order. Market lot size filter parameters.

minNotional

DecimalString

true

Minimum order notional value. Notional filter parameters.

maxNotional

DecimalString

true

Maximum order notional value. Notional filter parameters.

buyLimitUpRatio

DecimalString

true

Limit order price limitation parameters

sellLimitDownRatio

DecimalString

true

Limit order price limitation parameters

marketDeviationRatio

DecimalString

true

Market order price limitation parameters

makerFee

DecimalString

true

Default maker fee ratio

takerFee

DecimalString

true

Default taker fee ratio

status

string

true

TRADING, HALT

PerpsSymbol

Name
Type
Required
Description

id

uint64

true

Symbol ID

name

string

true

Symbol name, e.g. BTC-USD

displayName

string

true

Symbol name in UI

baseCoin

string

true

Base asset

quoteCoinID

uint64

true

Settlement coin ID

quoteCoin

string

true

Settlement coin name

quoteCoinPrecision

uint8

true

Settlement coin precision

pricePrecision

int32

true

Decimal precision of order price. Price filter parameters.

tickSize

DecimalString

true

Tick size of order price. Price filter parameters.

minPrice

DecimalString

true

Minimum order price. Price filter parameters.

maxPrice

DecimalString

true

Maximum order price. Price filter parameters.

quantityPrecision

int32

true

Decimal precision of order quantity. Lot size filter parameters.

openInterestCap

DecimalString

false

Open interest capacity in base coin

openInterestCapUSD

DecimalString

false

Open interest capacity in quote coin

stepSize

DecimalString

true

Step size of order quantity. Lot size filter parameters.

minQuantity

DecimalString

true

Minimum order quantity. Lot size filter parameters.

maxQuantity

DecimalString

true

Maximum order quantity. Lot size filter parameters.

marketMinQuantity

DecimalString

true

Minimum order quantity in market order. Market lot size filter parameters.

marketMaxQuantity

DecimalString

true

Maximum order quantity in market order. Market lot size filter parameters.

minNotional

DecimalString

true

Minimum order notional value. Notional filter parameters.

maxNotional

DecimalString

true

Maximum order notional value. Notional filter parameters.

buyLimitUpRatio

DecimalString

true

Limit order price limitation parameters

sellLimitDownRatio

DecimalString

true

Limit order price limitation parameters

marketDeviationRatio

DecimalString

true

Market order price limitation parameters

maxLeverage

uint32

true

Maximum leverage allowed

initLeverage

uint32

true

Initial leverage

marginTiers

Array<MarginTier>

true

Supported margin tiers

fundingInterval

uint32

true

Funding interval in seconds; must be a multiple of 3600.

interestRate

DecimalString

true

8h interest rate; always 0.0001

maxFundingRate

DecimalString

true

Maximum funding rate per funding interval

minFundingRate

DecimalString

true

Minimum funding rate per funding interval

makerFee

DecimalString

true

Default maker fee ratio

takerFee

DecimalString

true

Default taker fee ratio

status

string

true

Symbol status: TRADING, HALT

MarginTier

Name
Type
Required
Description

maxNotionalValue

DecimalString

true

Maximum notional value for this tier

maintenanceMarginRate

DecimalString

true

Maintenance margin rate for this tier

maxLeverage

uint32

true

Maximum leverage allowed in this tier

maintenanceDeduction

DecimalString

true

Maintenance deduction amount

Coin

SpotCoin

Name
Type
Required
Description

id

uint64

true

Unique coin ID

name

string

true

Unique coin name, e.g. vBTC, vUSDC

precision

uint8

true

Coin decimal precision

PerpsCoin

Name
Type
Required
Description

id

uint64

true

Unique coin ID

name

string

true

Unique coin name

precision

uint8

true

Coin decimal precision

marginRatio

DecimalString

true

Margin ratio of this coin

price

DecimalString

false

Current oracle price of this coin

Ticker

SpotTicker

Name
Type
Required
Description

symbol

string

true

Symbol name

lastPx

DecimalString

true

Last trade price

lastSz

DecimalString

false

Last trade quantity

openPx

DecimalString

true

Open price

highPx

DecimalString

true

High price

lowPx

DecimalString

true

Low price

vwap

DecimalString

false

Weighted average price

change

DecimalString

true

Price change

changePct

number

true

Price change percent

volume

DecimalString

true

Total traded base asset volume

quoteVolume

DecimalString

true

Total traded quote asset volume

bidPx

DecimalString

true

Best bid price

bidSz

DecimalString

true

Best bid quantity

askPx

DecimalString

true

Best ask price

askSz

DecimalString

true

Best ask quantity

openTime

uint64

true

Statistics open time in milliseconds

closeTime

uint64

true

Statistics close time in milliseconds

PerpsTicker

Name
Type
Required
Description

symbol

string

true

Symbol name

lastPx

DecimalString

true

Last trade price

lastSz

DecimalString

false

Last trade quantity

vwap

DecimalString

false

Weighted average price

change

DecimalString

false

Price change

changePct

number

false

Price change percent

openPx

DecimalString

true

Open price

highPx

DecimalString

true

High price

lowPx

DecimalString

true

Low price

volume

DecimalString

true

Total traded base asset volume

quoteVolume

DecimalString

true

Total traded quote asset volume

bidPx

DecimalString

true

Best bid price

bidSz

DecimalString

true

Best bid quantity

askPx

DecimalString

true

Best ask price

askSz

DecimalString

true

Best ask quantity

fundingRate

DecimalString

true

Current funding rate

nextFundingTime

uint64

true

Next funding time in milliseconds

indexPrice

DecimalString

true

Current index price

markPrice

DecimalString

true

Current mark price

openInterest

DecimalString

true

Current open interest

openTime

uint64

true

Statistics open time in milliseconds

closeTime

uint64

true

Statistics close time in milliseconds

Mini Ticker

MiniTicker

Name
Type
Required
Description

symbol

string

true

Symbol name

lastPx

DecimalString

true

Last trade price

openPx

DecimalString

true

Open price

highPx

DecimalString

true

High price

lowPx

DecimalString

true

Low price

volume

DecimalString

true

Total traded base asset volume

quoteVolume

DecimalString

true

Total traded quote asset volume

openTime

uint64

true

Statistics open time in milliseconds

closeTime

uint64

true

Statistics close time in milliseconds

Mark Price Ticker (perps only)

MarkPriceTicker

Name
Type
Required
Description

symbol

string

true

Symbol name

fundingRate

DecimalString

true

Current funding rate

nextFundingTime

uint64

true

Next funding time in milliseconds

indexPrice

DecimalString

true

Current index price

markPrice

DecimalString

true

Current mark price

openInterest

DecimalString

true

Current open interest

Book Ticker

BookTicker

Name
Type
Required
Description

symbol

string

true

Symbol name

bidPx

DecimalString

true

Best bid price

bidSz

DecimalString

true

Best bid quantity

askPx

DecimalString

true

Best ask price

askSz

DecimalString

true

Best ask quantity

Orderbook

OrderBook

Name
Type
Required
Description

blockTime

uint64

true

Block time in milliseconds

blockHeight

uint64

true

Block number

updateID

uint64

true

Last update ID for sync

bids

Array<[price, qty]>

true

Bid levels (price, quantity pairs)

asks

Array<[price, qty]>

true

Ask levels (price, quantity pairs)

Candle/KLines

RPCKline

Name
Type
Required
Description

t

uint64

true

Kline open time in milliseconds

o

DecimalString

true

Open price

h

DecimalString

true

High price

l

DecimalString

true

Low price

c

DecimalString

true

Close price

v

DecimalString

true

Base asset volume

q

DecimalString

true

Quote asset volume

n

uint64

false

Number of trades

Market Trades

Trade

Name
Type
Required
Description

t

uint64

true

Trade ID

T

uint64

true

Trade time in milliseconds

s

string

true

Symbol name

p

DecimalString

true

Price

q

DecimalString

true

Quantity

S

OrderSideEnum

true

Side: BUY or SELL

bi

uint64

false

Buyer account ID

si

uint64

false

Seller account ID

User Balance

SpotAccountBalances

Name
Type
Required
Description

blockTime

uint64

true

Block time in milliseconds

blockHeight

uint64

true

Block number

balances

Array<SpotBalance>

true

List of non zero balances

SpotBalance

Name
Type
Required
Description

id

uint64

true

Unique coin ID

coin

string

true

Coin name

total

DecimalString

true

Total balance (including locked)

locked

DecimalString

true

Locked balance in open orders

PerpsAccountBalance

Name
Type
Required
Description

blockTime

uint64

true

Block time in milliseconds

blockHeight

uint64

true

Block number

balances

Array<PerpsBalance>

true

List of non zero balances

PerpsBalance

Name
Type
Required
Description

id

uint64

true

Coin ID

coin

string

true

Coin name

total

DecimalString

true

The wallet balance

collateral

DecimalString

true

The collateral amount, only used by non-USDC assets

marginRatio

DecimalString

true

The margin ratio of this coin

price

DecimalString

false

The oracle price of this coin in USD

User Order

OrderBuilder

Name
Type
Required
Description

builderID

uint64

true

Builder account ID

feeRate

uint64

true

Builder fee rate in tenths of basis points. A value of 10 is 1 bp.

SpotAccountOpenOrder

Name
Type
Required
Description

blockTime

uint64

true

Block time in milliseconds

blockHeight

uint64

true

Block number

orders

Array<SpotOrder>

true

List of open orders

SpotOrder

Name
Type
Required
Description

orderID

uint64

true

Order ID

clOrdID

string

false

Client order ID

symbol

string

true

Symbol name

side

OrderSideEnum

true

Order side

type

OrderTypeEnum

true

Order type

timeInForce

TimeInForceEnum

false

Time in force

price

DecimalString

false

Order price

origQty

DecimalString

false

Original quantity

funds

DecimalString

false

Original quote funds

executedQty

DecimalString

true

Executed quantity

executedValue

DecimalString

true

Cumulative quote quantity

marginFrozen

DecimalString

true

Margin frozen by this order

builder

OrderBuilder

false

Builder attached to this order

status

OrderStatusEnum

true

Order status

createdAt

uint64

false

Order creation time in milliseconds

updatedAt

uint64

false

Order update time in milliseconds

PerpsAccountOpenOrder

Name
Type
Required
Description

blockTime

uint64

true

Block time in milliseconds

blockHeight

uint64

true

Block number

orders

Array<PerpsOrder>

true

List of open orders

PerpsOrder

Name
Type
Required
Description

orderID

uint64

true

Order ID

clOrdID

string

false

Client order ID

symbol

string

true

Symbol name

side

OrderSideEnum

true

Order side

type

OrderTypeEnum

true

Order type

timeInForce

TimeInForceEnum

false

Time in force

price

DecimalString

false

Order price

origQty

DecimalString

false

Original quantity

funds

DecimalString

false

Order Original funds

executedQty

DecimalString

true

Executed quantity

executedValue

DecimalString

true

Cumulative quote quantity

marginFrozen

DecimalString

true

Margin frozen by this order

builder

OrderBuilder

false

Builder attached to this order

status

OrderStatusEnum

true

Order status

createdAt

uint64

false

Order creation time in milliseconds

updatedAt

uint64

false

Order update time in milliseconds

positionSide

PositionSideEnum

true

Position side

reduceOnly

boolean

true

Reduce only flag

stopPrice

DecimalString

false

Stop price for TP/SL

stopType

StopTypeEnum

false

Stop type for TP/SL

triggerType

TriggerTypeEnum

false

Trigger type for TP/SL

positionID

uint64

false

Position ID this order is associated with (for position TP/SL)

primaryOrderID

uint64

false

Primary order ID this stop is attached to (for attached stops)

attachedOrderIDs

Array<uint64>

false

Order IDs of stops attached to this order (TP/SL)

User Position (perps only)

PerpsAccountOpenPosition

Name
Type
Required
Description

blockTime

uint64

true

Block time in milliseconds

blockHeight

uint64

true

Block number

positions

Array<Position>

true

List of open positions

Position

Name
Type
Required
Description

id

uint64

true

Position ID

symbol

string

true

Symbol name

marginMode

MarginModeEnum

true

Margin mode

positionSide

PositionSideEnum

true

Position side. Always BOTH for now.

size

DecimalString

true

Position size. Negative means short, positive means long.

initialMargin

DecimalString

true

Position initial margin. If isolated, this is also isolated margin.

avgEntryPrice

DecimalString

true

Average position entry price

cumOpenCost

DecimalString

true

Cumulative position open cost

cumTradingFee

DecimalString

true

Cumulative trading fee

cumFundingFee

DecimalString

true

Cumulative funding fee: positive received, negative paid. Default: "0".

cumClosedSize

DecimalString

true

Total closed size during the position lifetime

avgClosePrice

DecimalString

true

Average position close price

maxSize

DecimalString

true

Max position size during the position lifetime

realizedPnL

DecimalString

true

Realized profit and loss, includes trading fees and liquidation loss

leverage

uint32

true

Position leverage

active

bool

true

The position is active/working

isTakenOver

bool

true

Whether the position is taken over by liquidator

takeOverPrice

DecimalString

true

Mark price when taken over.

createdAt

uint64

true

Position creation timestamp, in milliseconds

updatedAt

uint64

true

Position updated timestamp, in milliseconds

  • If position side is BOTH, then positive position size is LONG, negative position size is SHORT, zero position size means position is closed.

  • If position side is LONG or SHORT. The position size is positive or zero, zero means position is closed.

  • For now, position side is always BOTH.

User Funding (perps only)

PerpsUserFunding

Name
Type
Required
Description

symbol

string

true

Symbol name

positionID

uint64

true

Position ID

positionSide

PositionSideEnum

true

LONG or SHORT

fundingFee

DecimalString

true

Funding fee (negative = received)

feeCoin

string

true

The name of the fee coin

timestamp

uint64

true

Funding time in milliseconds

User API Key

APIKey

Name
Type
Required
Description

name

string

true

API key name

type

APIKeyTypeEnum

true

API key type. String value of the enum.

publicKey

HexString

true

Public key (hex string)

expiresAt

uint64

true

Expiration timestamp (milliseconds)

permissions

uint64

false

Permission mask. A set bit disables the corresponding APIKeyPermissionEnum.

AccountAPIKeys

Name
Type
Required
Description

spot

Array<APIKey>

true

Spot API keys for the account

perps

Array<APIKey>

true

Perps API keys for the account

User Subaccounts

Subaccount

Name
Type
Required
Description

id

uint64

true

Account ID

evmAddress

HexString

true

Account EVM address

UserSubaccounts

Name
Type
Required
Description

userID

uint64

true

Internal user ID

primaryAccountID

uint64

true

Primary trading account ID

subaccounts

Array<Subaccount>

true

Subaccounts owned by this user

User Builder

Builder

Name
Type
Required
Description

userID

uint64

true

Internal user ID

builderID

uint64

true

Builder account ID

feeRate

uint64

true

Builder fee rate in tenths of basis points. A value of 10 is 1 bp.

Builders

Name
Type
Required
Description

spot

Array<Builder>

true

Spot builder approvals for the user

perps

Array<Builder>

true

Perps builder approvals for the user

BuilderFeeStats

Returned by Builder Fee Summary for cumulative Spot and Perps statistics.

Name
Type
Required
Description

address

HexString

false

Builder account owner's address.

name

string

true

Builder display name.

builderCode

string

true

Builder trading account ID, encoded as an unsigned 64-bit decimal string.

userCount

string

true

User count associated with the builder, encoded as an unsigned 64-bit decimal string.

builderFee

DecimalString

true

Builder fees earned.

tradeCount

string

true

Number of fills attributed to the builder, encoded as an unsigned 64-bit decimal string.

tradeVolume

DecimalString

true

Traded notional attributed to the builder.

BuilderFeeDailyStats

Returned by Builder Fee Daily Chart for each UTC day's Spot and Perps activity.

Name
Type
Required
Description

date

string

true

UTC date in YYYY-MM-DD format.

userCount

string

true

User count associated with the builder, encoded as an unsigned 64-bit decimal string.

builderFee

DecimalString

true

Builder fees earned that day.

tradeCount

string

true

Number of fills attributed to the builder that day, encoded as an unsigned 64-bit decimal string.

tradeVolume

DecimalString

true

Traded notional attributed to the builder that day.

User TWAP

AccountTwapOrders

Name
Type
Required
Description

blockTime

uint64

true

Block time in milliseconds

blockHeight

uint64

true

Block number

twaps

Array<TwapOrder>

true

List of active TWAP orders

TwapOrder

Name
Type
Required
Description

symbol

string

true

Symbol name

orderID

uint64

true

TWAP order ID

quantity

DecimalString

true

TWAP total quantity

side

OrderSideEnum

true

Order side as BUY or SELL

minutes

uint64

true

TWAP duration in minutes

randomize

bool

true

Whether slices are randomized

reduceOnly

bool

true

Reduce-only flag

executedQty

DecimalString

true

Executed quantity

executedValue

DecimalString

true

Executed notional value

createdAt

uint64

true

Creation time in milliseconds

nextActiveAt

uint64

true

Next activation time in milliseconds

active

bool

true

Whether this TWAP is active

TwapOrderResponse

Name
Type
Required
Description

orderID

uint64

true

TWAP order ID

User DCA

AccountDcaOrders

Name
Type
Required
Description

blockTime

uint64

true

Unix timestamp in milliseconds of the block represented by this snapshot.

blockHeight

uint64

true

Block height represented by this snapshot.

dcas

Array<DcaOrder>

true

Plans with status ACTIVE for the selected account.

DcaOrder

Name
Type
Required
Description

symbol

string

true

Trading symbol name.

orderID

uint64

true

Parent plan ID, used to cancel the plan and link its child fills.

amount

DecimalString

true

Configured USDC notional for each BUY or SELL execution.

side

OrderSideEnum

true

Execution side, returned as BUY or SELL.

schedule

DcaSchedule

true

Recurring UTC schedule in the same format as creation.

minPrice

DecimalString

false

Configured inclusive lower reference-price bound; omitted when unset.

maxPrice

DecimalString

false

Configured inclusive upper reference-price bound; omitted when unset.

randomize

bool

true

Whether calendar executions are randomized within the selected hour.

immediate

bool

true

Whether an immediate first attempt was requested, independently of its outcome.

executedQty

DecimalString

true

Total base quantity actually filled across child execution orders.

executedValue

DecimalString

true

Sum of filled quantity multiplied by fill price across child orders, excluding fees.

failures

uint32

true

Current consecutive execution failure count.

createdAt

uint64

true

Plan creation time as a Unix timestamp in milliseconds.

nextActiveAt

uint64

true

Next scheduled trigger as a Unix timestamp in milliseconds. Processing can occur later.

status

DcaOrderStatusEnum

true

Plan lifecycle status; see DcaOrderStatusEnum.

DcaOrderResponse

The data object returned by a create/cancel request.

Name
Type
Required
Description

code

int32

true

0 for an accepted result

orderID

uint64

false

Parent plan ID returned when the request succeeds.

error

string

false

Error text when present

Fee Rate

FeeRate

Name
Type
Required
Description

makerFeeRate

DecimalString

true

Effective maker fee rate after discounts. Negative values indicate a maker rebate.

takerFeeRate

DecimalString

true

Effective taker fee rate after discounts.

feeTier

int

true

Fee tier (0-6) determined by the user's 14-day weighted trading volume.

stakingTier

int

true

Staking tier (0-6) determined by the user's SOSO token staking amount.

makerRebateTier

int

true

Maker rebate tier (0-3) determined by the user's share of global 14-day maker volume.

User Trade

UserTrade

Name
Type
Required
Description

symbol

string

true

Symbol name

tradeID

uint64

true

Trade ID

orderID

uint64

true

Order ID

clOrdID

string

true

Client Order ID

side

OrderSideEnum

true

Trade side: BUY or SELL

price

DecimalString

true

Trade price

quantity

DecimalString

true

Trade quantity

fee

DecimalString

false

Total fee charged on this fill, including the builder fee

builderFee

DecimalString

false

Actual builder fee component already included in fee

feeCoin

string

false

Commission asset

isMaker

bool

false

Whether trade was maker

time

uint64

true

Trade time in milliseconds

WebSocket Types

Misc types

WsPingRequest

WsPingResponse

WsErrorResponse

WsSubscriptionRequest

WsSubscriptionResponse

WsSubscriptionParams

WsSubscriptionResult

WsTickerSubscriptionParams

WsTickerSubscriptionResult

WsAllTickerSubscriptionParams

WsAllTickerSubscriptionResult

WsMiniTickerSubscriptionParams

WsMiniTickerSubscriptionResult

WsAllMiniTickerSubscriptionParams

WsAllMiniTickerSubscriptionResult

WsBookTickerSubscriptionParams

WsBookTickerSubscriptionResult

WsAllBookTickerSubscriptionParams

WsAllBookTickerSubscriptionResult

WsMarkPriceSubscriptionParams

WsMarkPriceSubscriptionResult

WsAllMarkPriceSubscriptionParams

WsAllMarkPriceSubscriptionResult

WsCoinPriceSubscriptionParams

WsCoinPriceSubscriptionResult

WsAllCoinPriceSubscriptionParams

WsAllCoinPriceSubscriptionResult

WsL2BookSubscriptionParams

WsL2BookSubscriptionResult

WsL4BookSubscriptionParams

WsL4BookSubscriptionResult

WsCandleSubscriptionParams

WsCandleSubscriptionResult

WsTradeSubscriptionParams

WsTradeSubscriptionResult

WsUserFrontendStateSubscriptionParams

WsUserFrontendStateSubscriptionResult

WsAccountUpdateSubscriptionParams

WsAccountUpdateSubscriptionResult

WsOrderUpdateSubscriptionParams

WsOrderUpdateSubscriptionResult

WsUserTradeSubscriptionParams

WsUserTradeSubscriptionResult

WsUserEventSubscriptionParams

WsUserEventSubscriptionResult

Ticker

WsTickerData

Mini Ticker

WsMiniTickerData

Book Ticker

WsBookTickerData

Mark Price (perps only)

WsMarkPriceData

Coin Price (perps only)

WsCoinPriceData

Book Depth Snapshot

WsDepthSnapshotData

Book Depth Update

WsDepthUpdateData

Candle / Kline

Candle

Account Update

  • Spot Account Update

WsSpotBalance

WsTwapOrder

WsDcaOrder

sc uses DcaSchedule. Other fields follow the meanings in DcaOrder.

WsSpotAccountUpdate

  • Perp Account Update

WsPerpsBalanceLite

WsPerpsPositionLite

WsPerpsAccountUpdate

Order Update

  • Spot Order Update

WsSpotOrder

WsSpotOrderUpdate

  • Perp Order Update

WsPerpsOrder

WsPerpsOrderUpdate

Market Trades

WsTrade

User Trades

  • Spot

WsSpotUserTrade

  • Perps

WsPerpsUserTrade

User Frontend State

  • Spot

WsSpotState

  • Perps

WsPerpsBalance

WsPerpsPosition

WsPerpsSymbolConfig

WsPerpsBalanceDetailed

WsPerpsState

User Event

PerpsLiquidatedPosition

WsUserLiquidation

WsUserEvent

Last updated