Developers

Enums

Every enum: the value names sent on the wire and the integer codes used when signing.

On this page

Enums travel as their name in JSON (e.g. "GOOD_TILL_TIME"). The integer value is only used inside EIP-712 signatures (enumCode).

AlgoOrderType

Defines the type of an algo order

NameValueMeaning
CHASE1A post-only limit order that re-prices toward the best bid/ask until filled or cancelled

AlgoTriggerFilter

Filters algo orders by whether they carry a trigger condition. Leave the filter unset to apply no trigger filter

NameValueMeaning
WITH_TRIGGER1Only algo orders that carry a trigger and wait for it to cross before becoming active
WITHOUT_TRIGGER2Only algo orders that have no trigger and become active on creation

AssetClass

Asset class of an instrument's underlying. The first five values (crypto through index) are general classifications used by Perpetuals for display. The remaining values (equityNasdaq, equityNyse, etc.) are schedule-specific and used by SFPs to route to a trading schedule

NameValueMeaning
CRYPTO1Digital assets (e.g. BTC, ETH)
EQUITY2Equities and equity-linked underlyings (e.g. stocks)
COMMODITY3Physical commodities (e.g. gold, oil)
FX4Foreign-exchange currency pairs
INDEX5Composite indices tracking a basket of underlyings
EQUITY_NASDAQ6NASDAQ-listed equities — maps to a TradingSchedule entry
EQUITY_NYSE7NYSE/NYSE Arca-listed equities and ETFs — maps to a TradingSchedule entry
EQUITY_KRX8Korea Exchange (KRX)-listed equities — maps to a TradingSchedule entry
COMMODITY_CME9CME-traded commodities — maps to a TradingSchedule entry
PRE_IPO10Pre-IPO instruments — maps to a TradingSchedule entry

BrokerTag

BrokerTag is a tag for the broker that the order is sent from.

NameValueMeaning
UNSPECIFIED0
COIN_ROUTES1CoinRoutes
ALERTATRON2Alertatron
ORIGAMI3Origami

CDCStatus

Per-asset collateral-deposit-cap (CDC) utilization status.

NameValueMeaning
NORMAL1CDC utilization below the reduce-only threshold.
REDUCE_ONLY2CDC utilization at or above the reduce-only threshold but below 100% — new collateral deposits are restricted.
AUTO_EXCHANGE3CDC utilization at or above 100% — subject to auto-exchange.

CancelStatus

NameValueMeaning
EXPIRED1Cancellation has expired because corresponding order had not arrived within the defined time-to-live window.
DROPPED_DUPLICATE2This cancellation request was dropped because its TTL window overlaps with another cancellation request for the same order.

CandlestickInterval

NameValueMeaning
CI_1_M11 minute
CI_3_M23 minutes
CI_5_M35 minutes
CI_15_M415 minutes
CI_30_M530 minutes
CI_1_H61 hour
CI_2_H72 hour
CI_4_H84 hour
CI_6_H96 hour
CI_8_H108 hour
CI_12_H1112 hour
CI_1_D121 day
CI_3_D133 days
CI_5_D145 days
CI_1_W151 week
CI_2_W162 weeks
CI_3_W173 weeks
CI_4_W184 weeks

CandlestickType

NameValueMeaning
TRADE1Tracks traded prices
MARK2Tracks mark prices
INDEX3Tracks index prices
MID4Tracks book mid prices

ChasePriceMode

Defines how a chase order determines its price at each re-price tick

NameValueMeaning
BEST_BID_ASK1The chase price equals the best bid (buy) or best ask (sell)

DayOfWeek

Day of the week, used by recurring trading schedule sessions

NameValueMeaning
MONDAY1Monday
TUESDAY2Tuesday
WEDNESDAY3Wednesday
THURSDAY4Thursday
FRIDAY5Friday
SATURDAY6Saturday
SUNDAY7Sunday

FundingRateAggregationType

Specifies different methods of aggregating historical funding rates

NameValueMeaning
FUNDING_INTERVAL1Default value -- one record returned per funding interval. Query instruments endpoint to learn funding interval of each instrument.
ONE_HOURLY2Returns one record per hour -- normalizes all funding rates to 1h durations, so fundingRate value is cumulative and can exceed a funding interval's configured cap / floor.
FOUR_HOURLY3Returns one record per 4 hours -- normalizes all funding rates to 4h durations, so fundingRate value is cumulative and can exceed a funding interval's configured cap / floor.
EIGHT_HOURLY4Returns one record for eight hours -- normalizes all funding rates to 8h durations, so fundingRate value is cumulative and can exceed a funding interval's configured cap / floor.

InstrumentSettlementPeriod

NameValueMeaning
PERPETUAL1Instrument settles through perpetual funding cycles
DAILY2Instrument settles at an expiry date, marked as a daily instrument
WEEKLY3Instrument settles at an expiry date, marked as a weekly instrument
MONTHLY4Instrument settles at an expiry date, marked as a monthly instrument
QUARTERLY5Instrument settles at an expiry date, marked as a quarterly instrument

InstrumentStatus

The lifecycle/trading status of an instrument on the Grvt exchange

NameValueMeaning
ACTIVE1Instrument is fully tradable
REDUCE_ONLY2Only position-reducing orders are accepted (e.g. pre-delist wind-down)
MAINTENANCE3Trading is temporarily paused for scheduled maintenance; cancel-only
HALTED4Underlying halted at its primary market (LULD, news pending); index and mark frozen
CLOSED5Outside trading window: daily maintenance break, weekend, holiday; cancel-only
PENDING6Instrument is created but not yet open for trading (pre-listing)
DELISTED7Instrument has been permanently removed

Kind

The list of asset kinds that are supported on the Grvt exchange

NameValueMeaning
PERPETUAL1the perpetual asset kind
FUTURE2the future asset kind
CALL3the call option asset kind
PUT4the put option asset kind
SPOT_SWAP8the spot swap asset kind
STABLE_PERP9Stable Funding Perp on an RWA underlying, USDC-settled

MarginType

NameValueMeaning
SIMPLE_CROSS_MARGIN2Simple Cross Margin Mode: all assets have a predictable margin impact, the whole sub-account shares a single margin
PORTFOLIO_CROSS_MARGIN3Portfolio Cross Margin Mode: asset margin impact is analysed on portfolio level, the whole sub-account shares a single margin

OrderRejectReason

NameValueMeaning
UNSPECIFIED0order is not cancelled or rejected
CLIENT_CANCEL1client called a Cancel API
CLIENT_BULK_CANCEL2client called a Bulk Cancel API
CLIENT_SESSION_END3client called a Session Cancel API, or set the WebSocket connection to 'cancelOrdersOnTerminate'
MARKET_CANCEL4the market order was cancelled after no/partial fill. Lower precedence than other TimeInForce cancel reasons
IOC_CANCEL5the IOC order was cancelled after no/partial fill
AON_CANCEL6the AON order was cancelled as it could not be fully matched
FOK_CANCEL7the FOK order was cancelled as it could not be fully matched
EXPIRED8the order was cancelled as it has expired
FAIL_POST_ONLY9the post-only order could not be posted into the orderbook
FAIL_REDUCE_ONLY10the reduce-only order would have caused position size to increase
MM_PROTECTION11the order was cancelled due to market maker protection trigger
SELF_TRADE_PROTECTION12the order was cancelled due to self-trade protection trigger
SELF_MATCHED_SUBACCOUNT13the order matched with another order from the same sub-account
OVERLAPPING_CLIENT_ORDER_ID14an active order on your sub-account shares the same clientOrderId
BELOW_MARGIN15the order will bring the sub-account below initial margin requirement
LIQUIDATION16the sub-account is liquidated (and all open orders are cancelled by the exchange)
INSTRUMENT_INVALID17instrument is invalid or not found on Grvt
INSTRUMENT_DEACTIVATED18instrument is no longer tradable on Grvt. (typically due to a market halt, or instrument expiry)
SYSTEM_FAILOVER19system failover resulting in loss of order state
UNAUTHORISED20the credentials used (userSession/apiKeySession/walletSignature) is not authorised to perform the action
SESSION_KEY_EXPIRED21the session key used to sign the order expired
SUB_ACCOUNT_NOT_FOUND22the sub-account does not exist
NO_TRADE_PERMISSION23the signature used to sign the order has no trade permission
UNSUPPORTED_TIME_IN_FORCE24the order payload does not contain a supported TimeInForce value
MULTI_LEGGED_ORDER25the order has multiple legs, but multiple legs are not supported by this venue
EXCEED_MAX_POSITION_SIZE26the order would have caused the sub-account to exceed the max position size
EXCEED_MAX_SIGNATURE_EXPIRATION27the signature supplied is more than 30 days in the future
MARKET_ORDER_WITH_LIMIT_PRICE28the market order has a limit price set
CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED29client cancel on disconnect triggered
OCO_COUNTER_PART_TRIGGERED30the OCO counter part order was triggered
REDUCE_ONLY_LIMIT31the remaining order size was cancelled because it exceeded current position size
CLIENT_REPLACE32the order was replaced by a client replace request
DERISK_MUST_BE_IOC33the derisk order must be an IOC order
DERISK_MUST_BE_REDUCE_ONLY34the derisk order must be a reduce-only order
DERISK_NOT_SUPPORTED35derisk is not supported
INVALID_ORDER_TYPE36the order type is invalid
CURRENCY_NOT_DEFINED37the currency is not defined
INVALID_CHAIN_ID38the chain ID is invalid
BUILDER_ORDER_FEE_EXCEED39Builder fee exceed the limit
BUILDER_ORDER_FEE_NEGATIVE40Builder fee is below 0
BUILDER_ORDER_BUILDER_NOT_AUTHORIZED41Builder is not an authorized builder for client
BUILDER_ORDER_BUILDER_NOT_EXIST42Builder does not exist
TRADE_PRICE_WORSE_THAN_BANKRUPTCY_PRICE44the trade price is worse than the bankruptcy price
TOO_MANY_MAKER_ORDERS45the order was cancelled due to matching with too many maker orders
REDUCE_ONLY_NOT_SUPPORTED_FOR_SPOT_ORDER46reduce-only order is not supported for spot order
TPSL_NOT_SUPPORTED_FOR_SPOT_ORDER47tpsl is not supported for spot order
SPOT_ORDER_NOT_SUPPORTED48spot order is not supported
INSUFFICIENT_BALANCE49the sub-account has insufficient balance
SPOT_TRADING_BLOCKED_DURING_SOCIALIZED_LOSS50spot trading is blocked during socialized loss (SLOW)
BELOW_MARGIN_WITH_PENALTY_DEVIATION51the order will bring the sub-account below initial margin requirement considering wide price deviation
CORPORATE_ACTION56Cancelled by the system due to Corporate Action
NOT_QUALIFIED_MAKER57the order was rejected because the sub-account is not a qualified maker
PRIVATE_QUOTE_REQUIRES_RFQ58rfq_id is required when is_private = true
STABLE_PERP_REQUIRES_PRICE_BOUND59a signed slippage bound filled in limit_price is required
UNSUPPORTED_TRIGGER_BY60SFP order only supports trigger_by = index or mid
RFQ_NOT_FOUND61the order was rejected because the referenced RFQ could not be found
RESTING_ORDER_WOULD_CROSS62post-only resting placement crosses opposite best resting or index mid
SESSION_CLOSED63the order was submitted when the trading session was either closed or under maintenance
RFQ_TERMINATED65the quote was cancelled because the RFQ it was bound to reached a terminal state — expired, cancelled by the taker, or closed once its taker order filled
STABLE_PERP_REQUIRES_MULTI_ASSET_MODE66stable perp orders require a multi-asset-mode sub-account
BORROW_LIMIT_EXCEEDED_AFTER_TRADE67the trade would have left the sub-account borrowing more than its tier borrow limit in the traded quote currency
UNDEPLOYED_LOAN_AUTO_EXCHANGE68an undeployed-loan (LTV) auto-exchange executed on the sub-account, and all open orders are cancelled by the exchange
LIQUIDATION_AUTO_EXCHANGE69a liquidation auto-exchange executed on the sub-account, and all open orders are cancelled by the exchange
USDC_COLLATERAL_DISABLED70USDC is not enabled as collateral on the sub-account, so USDC-quoted instruments cannot be traded; enable USDC as collateral first
SFP_POST_ONLY_NOT_ALLOWED71post-only orders are not supported on STABLE_PERP for accounts that are not qualified market makers; their orders only take liquidity
VAULT_NON_QUOTE_INVESTMENT_CURRENCY72the order was rejected because its sub-account is a vault in single-asset margin mode whose investment currency is not its quote currency, and such a vault cannot trade
RFQ_ID_REQUIRES_STABLE_PERP161rfq_id was set on an order whose instrument is not a STABLE_PERP; RFQ is a STABLE_PERP-only product
RFQ_PRIVATE_POOL_NOT_SUPPORTED162is_private = true is not supported yet; private per-RFQ quote pools are post-MVP
RFQ_REQUIRES_IOC163the taker order accepting an RFQ must be a bounded IOC order — IOC, carrying a limit price; an acceptance takes liquidity immediately and must not be able to rest on the book
RFQ_MISMATCH164the order does not match the RFQ it references — wrong instrument, or a side the RFQ did not request
RFQ_ALREADY_BOUND165the RFQ already has a taker order bound to it; an RFQ accepts only one
RFQ_MAKER_MUST_BE_ECN166a resting order carrying rfq_id must be an ECN quote (is_ecn = true)
FOK_NOT_SUPPORTED167fill-or-kill is not supported on STABLE_PERP yet
MARKET_ORDER_NOT_SUPPORTED168market orders are not supported on STABLE_PERP; a taker order must be a bounded IOC order, carrying a limit price
STABLE_PERP_ORDER_NOT_SUPPORTED169Stable funding perp orders are switched off in this environment.

OrderStatus

NameValueMeaning
PENDING1The exchange has accepted the order but not yet put it on the book, filled or rejected it. Not final.
OPEN2On the book, unfilled or partly filled. Not final.
FILLED3Fully filled. Final. A taker order can go straight from PENDING to FILLED.
REJECTED4Rejected by a check; reject_reason says which. Final. An order that reached OPEN is never rejected.
CANCELLED5Cancelled, by you or by the exchange (for example when its signature expires); reject_reason says why. Final.

PositionCloseStatus

NameValueMeaning
CLOSED1Position fully closed via reducing trade or flip
LIQUIDATED2Position closed via liquidation
SETTLED3Position closed via settlement
PARTIALLY_CLOSED4Position partially closed
SPLIT_CLOSED5Lifecycle ended by a stock split; reopened re-denominated

PositionMarginType

NameValueMeaning
ISOLATED1Isolated Margin Mode: each position is allocated a fixed amount of collateral
CROSS2Cross Margin Mode: uses all available funds in your account as collateral across all cross margin positions

RepaymentScenario

Whether a fill repaid a multi-asset-mode USDT loan, and how. UNSPECIFIED for ordinary trades. Only the exchange sets it: an order you send with any other value is rejected.

NameValueMeaning
MANUAL_REPAYMENT1You repaid the loan yourself.
AUTO_REPAYMENT2No longer used.
LIQUIDATION_REPAYMENT3Repaid during a liquidation.
AUTO_REPAY_BORROW_LIMIT4Repaid automatically because the loan went over its borrow limit.
AUTO_REPAY_LTV5Repaid automatically because of the loan-to-value ratio or a loan that wasn't put to use.
LIQUIDATION_REBALANCING6Collateral converted as part of a liquidation. No fee.

RfqCounterpartyType

NameValueMeaning
MAKER_QUOTE1the counterparty is a maker quote submitted to the RFQ
RESTING_ORDER2the counterparty is a resting order on the orderbook
FORCED_EXIT_NETTING3the counterparty is a forced-exit netting fill

RfqSide

NameValueMeaning
UNSPECIFIED0omitted = two-way request
BUY1the RFQ side is a buy
SELL2the RFQ side is a sell

SubAccountMode

NameValueMeaning
SINGLE_ASSET_MODE1Single asset mode: the sub-account is only allowed to hold one asset as collateral

TimeInForce

How long an order stays open, and whether it may fill partly.

Must fill in fullMay fill partly
Fills at once or is cancelledFILL_OR_KILLIMMEDIATE_OR_CANCEL
May restALL_OR_NONEGOOD_TILL_TIME
NameValueMeaning
GOOD_TILL_TIME1GTT. Rests on the book until it fills, you cancel it, or its signature.expiration passes.
ALL_OR_NONE2AON. Fills in full or not at all. Meant for block trades and RFQ maker quotes; the order book rejects it.
IMMEDIATE_OR_CANCEL3IOC. Fills as much as it can at once; the rest is cancelled.
FILL_OR_KILL4FOK. Fills in full at once, or is cancelled.
RETAIL_PRICE_IMPROVEMENT5RPI. A post-only GOOD_TILL_TIME maker order sent through the API, which only non-algorithmic orders from the Grvt UI can take.

TradingScheduleCloseType

How the market behaves on a holiday date

NameValueMeaning
FULL_DAY1Market is fully closed for the entire day
EARLY_CLOSE2Market closes early; see the earlyClose time

TradingSessionType

Specifies different types of trading sessions

NameValueMeaning
REGULAR1Core market hours. Full liquidity.
PRE_MARKET2Extended hours before open. Lower liquidity.
AFTER_MARKET3Extended hours after close. Lower liquidity.
OVERNIGHT4For 24/5 or specific overnight TradFi perps. Minimal liquidity.
CLOSE5Weekends, holidays, or daily maintenance windows.

TransferType

NameValueMeaning
UNSPECIFIED0Deprecated: use standard instead. Legacy value for transfers created before transfer types were introduced.
STANDARD1Standard transfer that has nothing to do with bridging
FAST_ARB_DEPOSIT2Fast Arb Deposit Metadata type
FAST_ARB_WITHDRAWAL3Fast Arb Withdrawal Metadata type
NON_NATIVE_BRIDGE_DEPOSIT4Transfer type for non native bridging deposit
NON_NATIVE_BRIDGE_WITHDRAWAL5Transfer type for non native bridging withdrawal
ADHOC_INCENTIVE6Transfer type for adhoc incentive
REFERRAL_INCENTIVE7Transfer type for referral incentive
TRADING_DEPOSIT_YIELD_INCENTIVE8Transfer type for trading deposit yield incentive
TGE_VESTING9Transfer type for TGE vesting distribution
TGE_AIRDROP10Transfer type for TGE airdrop distribution
FEEDBACK_REWARD11Transfer type for feedback reward distribution

TriggerBy

Defines the price type that activates a Take Profit (TP) or Stop Loss (SL) order.

Trigger orders are executed when the selected price type reaches the specified trigger price.Different price types ensure flexibility in executing strategies based on market conditions.

NameValueMeaning
UNSPECIFIED0no trigger condition
INDEX1Order is activated when the index price reaches the trigger price
LAST2Order is activated when the last trade price reaches the trigger price
MID3Order is activated when the mid price reaches the trigger price
MARK4Order is activated when the mark price reaches the trigger price

TriggerType

Defines the type of trigger order used in trading, such as Take Profit or Stop Loss.

Trigger orders allow execution based on pre-defined price conditions rather than immediate market conditions.

NameValueMeaning
UNSPECIFIED0Not a trigger order. The order executes normally without any trigger conditions.
TAKE_PROFIT1Take Profit Order - Executes when the price reaches a specified level to secure profits.
STOP_LOSS2Stop Loss Order - Executes when the price reaches a specified level to limit losses.

VaultInvestorAction

NameValueMeaning
UNSPECIFIED0
VAULT_INVEST1
VAULT_BURN_LP_TOKEN2
VAULT_REDEEM3

VaultRedemptionReqAgeCategory

Denotes the age category of a given redemption request.

NameValueMeaning
NORMAL1This request is at least as old as the minimum redemption period, and is eligible for automated redemption.
URGENT2This request is nearing the maxmimum redemption period and will be factored into pre-order check margin requirements.
OVERDUE3This request has exceeded the maximum redemption period and will be considered for forced redemptions.
PRE_MIN4This request has yet to exceed the minimum redemption period, and is not yet eligible for automated redemption.

Venue

The list of Trading Venues that are supported on the Grvt exchange

NameValueMeaning
ORDERBOOK1the trade is cleared on the orderbook venue
RFQ2the trade is cleared on the RFQ venue

WalletType

NameValueMeaning
FUNDING1Funding wallet
SPOT2Spot wallet
FUTURES3Futures wallet

WsCandlestickInterval

NameValueMeaning
CI_1_M11 minute
CI_3_M23 minutes
CI_5_M35 minutes
CI_15_M415 minutes
CI_30_M530 minutes
CI_1_H61 hour
CI_2_H72 hour
CI_4_H84 hour
CI_6_H96 hour
CI_8_H108 hour
CI_12_H1112 hour
CI_1_D121 day
CI_3_D133 days
CI_5_D145 days
CI_1_W151 week from Thursday
CI_2_W162 weeks from Thursday
CI_3_W173 weeks from Thursday
CI_4_W184 weeks from Thursday
esc

↑ ↓ move↵ open⇧↵ open .mdTry an error code like 2002

Keyboard shortcuts

⌘ K
Search the docs
/
Search
l
Next code language (Python → TypeScript → Go → Rust → curl → WebSocket)
j / k
Next / previous page
t
Light / dark theme
?
This help
Esc
Close dialogs and drawers