Schema

Enums

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.

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 AddAPIKey only).

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

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

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

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

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.

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

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

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)

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

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

marginRatio

DecimalString

true

The margin ratio of this coin

price

DecimalString

false

The oracle price of this coin in USD

User Order

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

origQty

funds

false

Order Original funds

executedQty

DecimalString

true

Executed quantity

executedValue

DecimalString

true

Cumulative quote quantity

marginFrozen

DecimalString

true

Margin frozen by 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

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

side

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

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)

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

Commission amount

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

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

Book Depth Snapshot

WsDepthSnapshotData

Book Depth Update

WsDepthUpdateData

Candle / Kline

Candle

Account Update

  • Spot Account Update

WsSpotBalance

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