Skip to content

Class: CBAdvancedTradeGlobalClient ​

REST client for Coinbase's Global Derivatives Advanced Trade API: https://docs.cdp.coinbase.com/coinbase-app/advanced-trade-apis/guides/derivatives/overview

Deribit-powered gateway running on the Starbase platform. JSON-RPC 2.0 at https://drb.coinbase.com/api/v2

Parameters and responses are not the Advanced Trade REST shapes. Prices and sizes are JSON numbers. instrument_name replaces the old product id (BTC-PERP-INTX becomes BTC_USDC-PERPETUAL). label replaces client_order_id and is not unique. Order type, time in force, and status are lowercase. BaseRestClient handles JSON-RPC formatting, result extraction, errors and authentication.

Block/RFQ methods typed with any describe the SDK’s request routes, not a verified current API contract. Confirm their availability and parameters against current Coinbase documentation before use.

Extends ​

  • BaseRestClient

Constructors ​

Constructor ​

ts
new CBAdvancedTradeGlobalClient(restClientOptions?: RestClientOptions, networkOptions?: AxiosRequestConfig): CBAdvancedTradeGlobalClient;

Create an instance of the REST client. Pass API credentials in the object in the first parameter.

Parameters ​

ParameterTypeDescription
restClientOptions?RestClientOptionsoptions to configure REST API connectivity
networkOptions?AxiosRequestConfigHTTP networking options for axios

Returns ​

CBAdvancedTradeGlobalClient

Inherited from ​

BaseRestClient.constructor

Methods ​

acceptBlockRfq() ​

ts
acceptBlockRfq(params?: any): Promise<any>;

JSON-RPC wrapper for private/accept_block_rfq, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


addBlockRfqQuote() ​

ts
addBlockRfqQuote(params?: any): Promise<any>;

JSON-RPC wrapper for private/add_block_rfq_quote, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>. When parameters are supplied, the SDK applies its label validation before sending.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


approveBlockTrade() ​

ts
approveBlockTrade(params?: any): Promise<any>;

JSON-RPC wrapper for private/approve_block_trade, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


auth() ​

ts
auth(params?: AdvTradeGlobalAuthRequest): Promise<AdvTradeGlobalAuthResult>;

Auth

Authenticate using a Coinbase-issued credential. Only POST is supported. Send the JSON-RPC request in the request body; query-string credentials are not accepted.

JSON-RPC: public/auth

Parameters ​

ParameterType
params?AdvTradeGlobalAuthRequest

Returns ​

Promise<AdvTradeGlobalAuthResult>


cancelAll() ​

ts
cancelAll(params?: AdvTradeGlobalCancelAllRequest): Promise<number>;

Cancel All

Cancels all open orders and trigger orders for the authenticated account across all currencies and instrument kinds. This is a bulk cancellation operation useful for quickly clearing all active orders. Use the detailed parameter to receive a list of all cancelled orders. Set freeze_quotes to reject incoming quotes for one second after cancellation. Note: This operation cannot be undone. All open orders will be permanently cancelled.

Replaces POST /orders/batch_cancel

JSON-RPC: private/cancel_all

Parameters ​

ParameterType
params?AdvTradeGlobalCancelAllRequest

Returns ​

Promise<number>


cancelAllBlockRfqQuotes() ​

ts
cancelAllBlockRfqQuotes(params?: any): Promise<any>;

JSON-RPC wrapper for private/cancel_all_block_rfq_quotes, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


cancelAllByCurrency() ​

ts
cancelAllByCurrency(params: AdvTradeGlobalCancelAllByCurrencyRequest): Promise<number>;

Cancel All By Currency

Cancels all open orders for a specific currency. This is useful for quickly clearing all orders across multiple instruments in a currency. Orders can be optionally filtered by instrument kind (future, option, etc.) and/or order type (limit, market, stop, etc.). Use the detailed parameter to receive a list of all cancelled orders.

Replaces POST /orders/batch_cancel

JSON-RPC: private/cancel_all_by_currency

Parameters ​

ParameterType
paramsAdvTradeGlobalCancelAllByCurrencyRequest

Returns ​

Promise<number>


cancelAllByCurrencyPair() ​

ts
cancelAllByCurrencyPair(params: AdvTradeGlobalCancelAllByCurrencyPairRequest): Promise<number>;

Cancel All By Currency Pair

Cancels all open orders for a specific currency pair. This is useful for quickly clearing all orders across instruments in a currency pair. Orders can be optionally filtered by instrument kind (future, option, etc.) and/or order type (limit, market, stop, etc.). Use the detailed parameter to receive a list of all cancelled orders.

Replaces POST /orders/batch_cancel

JSON-RPC: private/cancel_all_by_currency_pair

Parameters ​

ParameterType
paramsAdvTradeGlobalCancelAllByCurrencyPairRequest

Returns ​

Promise<number>


cancelAllByInstrument() ​

ts
cancelAllByInstrument(params: AdvTradeGlobalCancelAllByInstrumentRequest): Promise<number>;

Cancel All By Instrument

Cancels all open orders for a specific instrument. This is useful for quickly clearing all orders for a single instrument. Orders can be optionally filtered by order type (limit, market, stop, etc.). Use the detailed parameter to receive a list of all cancelled orders. The include_combos parameter can be used to include combo orders in the cancellation.

Replaces POST /orders/batch_cancel

JSON-RPC: private/cancel_all_by_instrument

Parameters ​

ParameterType
paramsAdvTradeGlobalCancelAllByInstrumentRequest

Returns ​

Promise<number>


cancelAllByKindOrType() ​

ts
cancelAllByKindOrType(params: AdvTradeGlobalCancelAllByKindOrTypeRequest): Promise<number>;

Cancel All By Kind Or Type

Cancels all open orders in one or more currencies, optionally filtered by instrument kind and/or order type. This provides flexible bulk cancellation across multiple currencies. Specify one or more currencies, and optionally filter by instrument kind (future, option, etc.) and/or order type (limit, market, stop, etc.). Use the detailed parameter to receive a list of all cancelled orders.

Replaces POST /orders/batch_cancel

JSON-RPC: private/cancel_all_by_kind_or_type

Parameters ​

ParameterType
paramsAdvTradeGlobalCancelAllByKindOrTypeRequest

Returns ​

Promise<number>


cancelBlockRfq() ​

ts
cancelBlockRfq(params?: any): Promise<any>;

JSON-RPC wrapper for private/cancel_block_rfq, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


cancelBlockRfqQuote() ​

ts
cancelBlockRfqQuote(params?: any): Promise<any>;

JSON-RPC wrapper for private/cancel_block_rfq_quote, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


cancelBlockRfqTrigger() ​

ts
cancelBlockRfqTrigger(params?: any): Promise<any>;

JSON-RPC wrapper for private/cancel_block_rfq_trigger, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


cancelByLabel() ​

ts
cancelByLabel(params: AdvTradeGlobalCancelByLabelRequest): Promise<number>;

Cancel By Label

Cancels all orders (including trigger orders) that have a specific label. This is useful for managing groups of related orders that share the same label. Orders can be cancelled across all currencies or filtered to a specific currency. When cancelling by currency, the currency queue is used for processing. Rate Limits: When called without the currency parameter, this method is subject to cancel_all rate limits. Different rate limit values may apply for per-currency cancels versus calls without providing the currency parameter.

Replaces POST /orders/batch_cancel

JSON-RPC: private/cancel_by_label

Parameters ​

ParameterType
paramsAdvTradeGlobalCancelByLabelRequest

Returns ​

Promise<number>


cancelOrder() ​

ts
cancelOrder(params: AdvTradeGlobalCancelRequest): Promise<AdvTradeGlobalOrder>;

Cancel

Cancels a specific order identified by its order ID. The order must be open (not yet filled or cancelled) to be cancelled successfully. Once cancelled, the order is removed from the order book and cannot be restored. Any unfilled portion of the order will be cancelled.

Replaces POST /orders/batch_cancel

JSON-RPC: private/cancel

Parameters ​

ParameterType
paramsAdvTradeGlobalCancelRequest

Returns ​

Promise<AdvTradeGlobalOrder>


changeMarginModel() ​

ts
changeMarginModel(params: AdvTradeGlobalChangeMarginModelRequest): Promise<AdvTradeGlobalChangeMarginModelItem[]>;

Change Margin Model

Changes the margin model for the authenticated account or a specified subaccount. Margin models determine how margin requirements are calculated (e.g., Standard Margin vs. Portfolio Margin). Changing the margin model may affect margin requirements, available funds, and trading capabilities. Use the dry_run parameter to preview the impact of the change before applying it.

Replaces POST /intx/multi_asset_collateral

JSON-RPC: private/change_margin_model

Parameters ​

ParameterType
paramsAdvTradeGlobalChangeMarginModelRequest

Returns ​

Promise<AdvTradeGlobalChangeMarginModelItem[]>


closePosition() ​

ts
closePosition(params: AdvTradeGlobalClosePositionRequest): Promise<AdvTradeGlobalClosePositionResult>;

Close Position

Places a reduce-only order to close an existing position. Reduce-only orders can only reduce or close a position; they cannot open a new position or increase an existing one. You can specify whether to use a market or limit order. If using a limit order, provide the price. The order will automatically be set to reduce-only to ensure it only closes the position.

Replaces POST /orders/close_position

JSON-RPC: private/close_position

Parameters ​

ParameterType
paramsAdvTradeGlobalClosePositionRequest

Returns ​

Promise<AdvTradeGlobalClosePositionResult>


createBlockRfq() ​

ts
createBlockRfq(params?: any): Promise<any>;

JSON-RPC wrapper for private/create_block_rfq, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>. When parameters are supplied, the SDK applies its label validation before sending.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


createCombo() ​

ts
createCombo(params: AdvTradeGlobalCreateComboRequest): Promise<AdvTradeGlobalCombo>;

Create Combo

Verifies and creates a combo book or returns an existing combo matching the given trades. Combos allow trading on multiple instruments (futures and options) simultaneously as a single strategy. If a combo matching the provided trades already exists, this method returns the existing combo. Otherwise, it creates a new combo book with the specified leg structure.

JSON-RPC: private/create_combo

Parameters ​

ParameterType
paramsAdvTradeGlobalCreateComboRequest

Returns ​

Promise<AdvTradeGlobalCombo>


deletePrivate() ​

ts
deletePrivate(endpoint: string, params?: ParamsInRequest): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?ParamsInRequest

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.deletePrivate


disableCancelOnDisconnect() ​

ts
disableCancelOnDisconnect(params?: AdvTradeGlobalDisableCancelOnDisconnectRequest): Promise<"ok">;

Disable Cancel On Disconnect

Disable Cancel On Disconnect for the connection. When change is applied for the account, then every newly opened connection will start with inactive Cancel on Disconnect. WebSocket Only: This method is designed exclusively for WebSocket connections. Attempting to use it via REST/HTTP will result in an error response.

JSON-RPC: private/disable_cancel_on_disconnect

Parameters ​

ParameterType
params?AdvTradeGlobalDisableCancelOnDisconnectRequest

Returns ​

Promise<"ok">


editBlockRfqQuote() ​

ts
editBlockRfqQuote(params?: any): Promise<any>;

JSON-RPC wrapper for private/edit_block_rfq_quote, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


enableCancelOnDisconnect() ​

ts
enableCancelOnDisconnect(params?: AdvTradeGlobalEnableCancelOnDisconnectRequest): Promise<"ok">;

Enable Cancel On Disconnect

Enable Cancel On Disconnect for the connection. After enabling, all orders created via this connection will be automatically cancelled when the connection is closed. Cancel is triggered in the following cases: when the TCP connection is properly terminated, when the connection is closed due to 10 minutes of inactivity, or when a heartbeat detects a disconnection. To reduce the inactivity timeout, consider using public/set_heartbeat. Note: If the connection is gracefully closed using private/logout, cancel-on-disconnect will not be triggered. Notice: Cancel-on-Disconnect does not affect orders created by other connections - they will remain active! When change is applied on the account scope, then every newly opened connection will start with active Cancel on Disconnect. WebSocket Only: This method is designed exclusively for WebSocket connections. Attempting to use it via REST/HTTP will result in an error response.

JSON-RPC: private/enable_cancel_on_disconnect

Parameters ​

ParameterType
params?AdvTradeGlobalEnableCancelOnDisconnectRequest

Returns ​

Promise<"ok">


executeBlockTrade() ​

ts
executeBlockTrade(params?: any): Promise<any>;

JSON-RPC wrapper for private/execute_block_trade, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


generateNewOrderId() ​

ts
generateNewOrderId(): string;

Returns ​

string

Inherited from ​

BaseRestClient.generateNewOrderId


get() ​

ts
get(endpoint: string, params?: object): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?object

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.get


getAccessLog() ​

ts
getAccessLog(params?: AdvTradeGlobalGetAccessLogRequest): Promise<AdvTradeGlobalAccessLog[]>;

Get Access Log

Retrieves a log of API access attempts and authentication events for the authenticated account. The log includes information such as IP addresses, timestamps, API methods called, and authentication status. Use this method to monitor account security, review API usage patterns, and identify unauthorized access attempts. Results can be paginated using the offset and count parameters.

JSON-RPC: private/get_access_log

Parameters ​

ParameterType
params?AdvTradeGlobalGetAccessLogRequest

Returns ​

Promise<AdvTradeGlobalAccessLog[]>


getAccountSummaries() ​

ts
getAccountSummaries(params?: AdvTradeGlobalGetAccountSummariesRequest): Promise<AdvTradeGlobalGetAccountSummariesResult>;

Get Account Summaries

Retrieves a per-currency list of account summaries for the authenticated user. Each summary includes balance, equity, available funds, and margin information for each currency. To retrieve summaries for a specific subaccount, use the subaccount_id parameter. When the extended parameter is set to true, additional account details such as account ID, username, email, and account type are included.

JSON-RPC: private/get_account_summaries

Parameters ​

ParameterType
params?AdvTradeGlobalGetAccountSummariesRequest

Returns ​

Promise<AdvTradeGlobalGetAccountSummariesResult>


getAccountSummary() ​

ts
getAccountSummary(params: AdvTradeGlobalGetAccountSummaryRequest): Promise<AdvTradeGlobalGetAccountSummaryResult>;

Get Account Summary

Retrieves the account summary for a specific currency. The summary includes cash balance, equity, margin_balance, available_funds, available_withdrawal_funds, initial/maintenance margin, session and total PnL, options greeks, and related fields. Key relationships (standard margin): equity = balance + futures session PnL

  • options_value, margin_balance = equity - options_value, available_funds = max(0, margin_balance - initial_margin). Under portfolio margin, margin_balance equals equity. Session PnL fields reset at daily settlement; total_pl does not. To retrieve the summary for a specific subaccount, use the subaccount_id parameter. When the extended parameter is set to true, additional account details such as account ID, username, email, and account type are included.

Replaces GET /intx/portfolio/

JSON-RPC: private/get_account_summary

Parameters ​

ParameterType
paramsAdvTradeGlobalGetAccountSummaryRequest

Returns ​

Promise<AdvTradeGlobalGetAccountSummaryResult>


getAnnouncements() ​

ts
getAnnouncements(params?: AdvTradeGlobalGetAnnouncementsRequest): Promise<AdvTradeGlobalGetAnnouncementsItem[]>;

Get Announcements

Retrieves platform announcements and important notices. Announcements include system updates, maintenance schedules, new features, policy changes, and other important information. Results are returned in reverse chronological order (newest first). The default start_timestamp is the current time, and the count parameter must be between 1 and 50 (default is 5).

JSON-RPC: public/get_announcements

Parameters ​

ParameterType
params?AdvTradeGlobalGetAnnouncementsRequest

Returns ​

Promise<AdvTradeGlobalGetAnnouncementsItem[]>


getBlockRfqMakers() ​

ts
getBlockRfqMakers(params?: any): Promise<any>;

JSON-RPC wrapper for private/get_block_rfq_makers, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


getBlockRfqQuotes() ​

ts
getBlockRfqQuotes(params?: any): Promise<any>;

JSON-RPC wrapper for private/get_block_rfq_quotes, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


getBlockRfqs() ​

ts
getBlockRfqs(params?: any): Promise<any>;

JSON-RPC wrapper for private/get_block_rfqs, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


getBlockRfqTrades() ​

ts
getBlockRfqTrades(params?: any): Promise<any>;

JSON-RPC wrapper for public/get_block_rfq_trades, sent as POST /api/v2.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


getBlockRfqUserInfo() ​

ts
getBlockRfqUserInfo(params?: any): Promise<any>;

JSON-RPC wrapper for private/get_block_rfq_user_info, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


getBlockTrade() ​

ts
getBlockTrade(params?: any): Promise<any>;

JSON-RPC wrapper for private/get_block_trade, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


getBlockTradeRequests() ​

ts
getBlockTradeRequests(params?: any): Promise<any>;

JSON-RPC wrapper for private/get_block_trade_requests, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


getBlockTrades() ​

ts
getBlockTrades(params?: any): Promise<any>;

JSON-RPC wrapper for private/get_block_trades, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


getBookSummaryByCurrency() ​

ts
getBookSummaryByCurrency(params: AdvTradeGlobalGetBookSummaryByCurrencyRequest): Promise<AdvTradeGlobalBookSummary[]>;

Get Book Summary By Currency

Retrieves summary information such as open interest, 24-hour volume, best bid/ask prices, last trade price, and other market statistics for all instruments in a given currency. Results can be filtered by instrument kind (future, option, etc.). This method provides a quick overview of market activity across all instruments for a currency. Note: For real-time updates, we recommend using the WebSocket subscription to ticker.{instrument_name}.{interval} instead of polling this endpoint.

JSON-RPC: public/get_book_summary_by_currency

Parameters ​

ParameterType
paramsAdvTradeGlobalGetBookSummaryByCurrencyRequest

Returns ​

Promise<AdvTradeGlobalBookSummary[]>


getBookSummaryByInstrument() ​

ts
getBookSummaryByInstrument(params: AdvTradeGlobalGetBookSummaryByInstrumentRequest): Promise<AdvTradeGlobalBookSummary[]>;

Get Book Summary By Instrument

Retrieves summary information such as open interest, 24-hour volume, best bid/ask prices, last trade price, mark price, and other market statistics for a specific instrument. This method provides a quick overview of current market activity and liquidity for a single instrument.

JSON-RPC: public/get_book_summary_by_instrument

Parameters ​

ParameterType
paramsAdvTradeGlobalGetBookSummaryByInstrumentRequest

Returns ​

Promise<AdvTradeGlobalBookSummary[]>


getBrokerTradeRequests() ​

ts
getBrokerTradeRequests(params?: any): Promise<any>;

JSON-RPC wrapper for private/get_broker_trade_requests, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


getBrokerTrades() ​

ts
getBrokerTrades(params?: any): Promise<any>;

JSON-RPC wrapper for private/get_broker_trades, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


getCancelOnDisconnect() ​

ts
getCancelOnDisconnect(params?: AdvTradeGlobalGetCancelOnDisconnectRequest): Promise<AdvTradeGlobalGetCancelOnDisconnectResult>;

Get Cancel On Disconnect

Read current Cancel On Disconnect configuration for the account.

JSON-RPC: private/get_cancel_on_disconnect

Parameters ​

ParameterType
params?AdvTradeGlobalGetCancelOnDisconnectRequest

Returns ​

Promise<AdvTradeGlobalGetCancelOnDisconnectResult>


getClientType() ​

ts
getClientType(): RestClientType;

Defines the client type (affecting how requests & signatures behave)

Returns ​

RestClientType

Overrides ​

BaseRestClient.getClientType


getComboDetails() ​

ts
getComboDetails(params: AdvTradeGlobalGetComboDetailsRequest): Promise<AdvTradeGlobalCombo>;

Get Combo Details

Retrieves detailed information about a specific combo, including its leg structure, state, and other properties. Use public/get_combo_ids to get a list of available combo IDs.

JSON-RPC: public/get_combo_details

Parameters ​

ParameterType
paramsAdvTradeGlobalGetComboDetailsRequest

Returns ​

Promise<AdvTradeGlobalCombo>


getComboIds() ​

ts
getComboIds(params: AdvTradeGlobalGetComboIdsRequest): Promise<string[]>;

Get Combo Ids

Retrieves available combo IDs. This method can be used to get the list of all combos, or only the list of combos in the given state. Use public/get_combo_details to retrieve detailed information about a specific combo.

JSON-RPC: public/get_combo_ids

Parameters ​

ParameterType
paramsAdvTradeGlobalGetComboIdsRequest

Returns ​

Promise<string[]>


getCombos() ​

ts
getCombos(params: AdvTradeGlobalGetCombosRequest): Promise<AdvTradeGlobalCombo[]>;

Get Combos

Retrieves information about active combos for the specified currency. Returns detailed information including leg structures and combo properties. For a list of combo IDs only, use public/get_combo_ids. For details about a specific combo, use public/get_combo_details.

JSON-RPC: public/get_combos

Parameters ​

ParameterType
paramsAdvTradeGlobalGetCombosRequest

Returns ​

Promise<AdvTradeGlobalCombo[]>


getContractSize() ​

ts
getContractSize(params: AdvTradeGlobalGetContractSizeRequest): Promise<AdvTradeGlobalGetContractSizeResult>;

Get Contract Size

Retrieves the contract size (also known as contract multiplier) for a given instrument. The contract size is the value of one contract, expressed in the same unit as the order amount: USD for inverse (reversed) futures and perpetuals, and the base currency coin for options, spots, and linear futures and perpetuals. This value is essential for calculating position values, margin requirements, and P&L calculations. Different instruments may have different contract sizes.

JSON-RPC: public/get_contract_size

Parameters ​

ParameterType
paramsAdvTradeGlobalGetContractSizeRequest

Returns ​

Promise<AdvTradeGlobalGetContractSizeResult>


getCurrencies() ​

ts
getCurrencies(): Promise<AdvTradeGlobalCurrencyWithApr[]>;

List currencies supported by the Global API, including their codes and basic information. This method takes no parameters.

JSON-RPC: public/get_currencies.

Returns ​

Promise<AdvTradeGlobalCurrencyWithApr[]>


getDeliveryPrices() ​

ts
getDeliveryPrices(params: AdvTradeGlobalGetDeliveryPricesRequest): Promise<AdvTradeGlobalGetDeliveryPricesResult>;

Get Delivery Prices

Retrieves historical delivery prices for a given index. Delivery prices are the settlement prices used when futures or options contracts expire and are settled. Results can be paginated using the offset and count parameters. This method is useful for analyzing historical settlement prices and understanding how contracts have been settled over time.

JSON-RPC: public/get_delivery_prices

Parameters ​

ParameterType
paramsAdvTradeGlobalGetDeliveryPricesRequest

Returns ​

Promise<AdvTradeGlobalGetDeliveryPricesResult>


getExpirations() ​

ts
getExpirations(params: AdvTradeGlobalGetExpirationsRequest): Promise<AdvTradeGlobalExpirations[]>;

Get Expirations

Retrieves all available expiration timestamps for instruments. This method can be used to discover which expiration dates are available for trading, which is useful for finding instruments with specific expiration dates. Results can be filtered by settlement currency, instrument kind (future or option), and currency pair. The response includes expiration timestamps in milliseconds since the UNIX epoch.

JSON-RPC: public/get_expirations

Parameters ​

ParameterType
paramsAdvTradeGlobalGetExpirationsRequest

Returns ​

Promise<AdvTradeGlobalExpirations[]>


getFundingChartData() ​

ts
getFundingChartData(params: AdvTradeGlobalGetFundingChartDataRequest): Promise<AdvTradeGlobalGetFundingChartDataResult>;

Get Funding Chart Data

Retrieves funding rate chart data points for a PERPETUAL instrument within a given time period. The data is formatted for use in charting applications and includes funding rate values at regular intervals. Use the length parameter to specify the time period for which to retrieve chart data. This method is useful for visualizing funding rate trends over time.

JSON-RPC: public/get_funding_chart_data

Parameters ​

ParameterType
paramsAdvTradeGlobalGetFundingChartDataRequest

Returns ​

Promise<AdvTradeGlobalGetFundingChartDataResult>


getFundingRateHistory() ​

ts
getFundingRateHistory(params: AdvTradeGlobalGetFundingRateHistoryRequest): Promise<AdvTradeGlobalGetFundingRateHistoryItem[]>;

Get Funding Rate History

Retrieves hourly historical funding rate (interest rate) data for a PERPETUAL instrument over a specified time period. Funding rates are periodic payments exchanged between long and short positions in perpetual contracts. The response includes hourly funding rate values, which can be used to analyze funding rate trends and calculate historical funding costs. This method is applicable only for PERPETUAL instruments.

JSON-RPC: public/get_funding_rate_history

Parameters ​

ParameterType
paramsAdvTradeGlobalGetFundingRateHistoryRequest

Returns ​

Promise<AdvTradeGlobalGetFundingRateHistoryItem[]>


getFundingRateValue() ​

ts
getFundingRateValue(params: AdvTradeGlobalGetFundingRateValueRequest): Promise<number>;

Get Funding Rate Value

Retrieves the funding rate (interest rate) value for a perpetual instrument over a specified time period. Funding rates are periodic payments exchanged between long and short positions in perpetual contracts. This method is applicable only for PERPETUAL instruments. The funding rate is typically expressed as a percentage and is used to keep the perpetual contract price aligned with the underlying index price.

JSON-RPC: public/get_funding_rate_value

Parameters ​

ParameterType
paramsAdvTradeGlobalGetFundingRateValueRequest

Returns ​

Promise<number>


getHistoricalVolatility() ​

ts
getHistoricalVolatility(params: AdvTradeGlobalGetHistoricalVolatilityRequest): Promise<AdvTradeGlobalGetHistoricalVolatilityItem[]>;

Get Historical Volatility

Provides historical volatility data for a given cryptocurrency. Historical volatility measures the degree of price variation over a past period and is useful for risk assessment and option pricing. The response includes volatility statistics calculated from historical price movements. This data can be used for portfolio risk analysis and understanding market conditions.

JSON-RPC: public/get_historical_volatility

Parameters ​

ParameterType
paramsAdvTradeGlobalGetHistoricalVolatilityRequest

Returns ​

Promise<AdvTradeGlobalGetHistoricalVolatilityItem[]>


getIndexChartData() ​

ts
getIndexChartData(params: AdvTradeGlobalGetIndexChartDataRequest): Promise<number[][]>;

Get Index Chart Data

Returns historical price index chart data for the specified index name and time range. The data is formatted for use in charting applications and shows price index values over time. Use the range parameter to specify the time period for which to retrieve chart data. This method is useful for visualizing price index trends and historical movements.

JSON-RPC: public/get_index_chart_data

Parameters ​

ParameterType
paramsAdvTradeGlobalGetIndexChartDataRequest

Returns ​

Promise<number[][]>


getIndexPrice() ​

ts
getIndexPrice(params: AdvTradeGlobalGetIndexPriceRequest): Promise<AdvTradeGlobalGetIndexPriceResult>;

Get Index Price

Retrieves the current index price value for a given index name. Index prices are used as reference prices for mark price calculations and settlement. Use get_index_price_names or get_supported_index_names to retrieve available index names.

JSON-RPC: public/get_index_price

Parameters ​

ParameterType
paramsAdvTradeGlobalGetIndexPriceRequest

Returns ​

Promise<AdvTradeGlobalGetIndexPriceResult>


getIndexPriceNames() ​

ts
getIndexPriceNames(params?: AdvTradeGlobalGetIndexPriceNamesRequest): Promise<AdvTradeGlobalGetIndexPriceNamesItem[]>;

Get Index Price Names

Retrieves the identifiers (names) of all supported price indexes. Price indexes are reference prices used for mark price calculations, settlement, and other market operations. When the extended parameter is set to true, the response includes additional information such as whether future combo creation and option combo creation are enabled for each index.

JSON-RPC: public/get_index_price_names

Parameters ​

ParameterType
params?AdvTradeGlobalGetIndexPriceNamesRequest

Returns ​

Promise<AdvTradeGlobalGetIndexPriceNamesItem[]>


getInstrument() ​

ts
getInstrument(params: AdvTradeGlobalGetInstrumentRequest): Promise<AdvTradeGlobalInstrument>;

Get Instrument

Retrieves detailed information about a specific instrument, including instrument specifications, contract details, tick size, settlement currency, expiration date (for futures and options), strike price (for options), underlying type, and other instrument parameters. This method is useful for obtaining instrument metadata needed for trading operations and calculations.

JSON-RPC: public/get_instrument

Parameters ​

ParameterType
paramsAdvTradeGlobalGetInstrumentRequest

Returns ​

Promise<AdvTradeGlobalInstrument>


getInstruments() ​

ts
getInstruments(params: AdvTradeGlobalGetInstrumentsRequest): Promise<AdvTradeGlobalInstrument[]>;

Get Instruments

Retrieves available trading instruments. This method can be used to see which instruments are available for trading, or which instruments have recently expired. Note - This method has distinct API rate limiting requirements: Sustained rate: 1 request/second. To avoid rate limits, we recommend using either the REST requests for server-cached data or the WebSocket subscription to instrument_state.{kind}.{currency} for real-time updates. For more information, see Rate Limits. Results can be filtered by currency and instrument kind (future, option, etc.). Set the expired parameter to true to retrieve recently expired instruments instead of active ones. Each instrument includes the underlying_type field indicating the underlying asset class (such as crypto, equity, or commodity).

Replaces GET /products

JSON-RPC: public/get_instruments

Parameters ​

ParameterType
paramsAdvTradeGlobalGetInstrumentsRequest

Returns ​

Promise<AdvTradeGlobalInstrument[]>

See ​

Advanced Trade Global market data


getLastSettlementsByCurrency() ​

ts
getLastSettlementsByCurrency(params: AdvTradeGlobalGetLastSettlementsByCurrencyRequest): Promise<AdvTradeGlobalGetLastSettlementsByCurrencyResult>;

Get Last Settlements By Currency

Retrieves historical settlement, delivery, and bankruptcy events from all instruments within a given currency. Settlement vs. delivery: Settlement is a daily event (at 08:00 UTC) for futures and perpetual positions that converts unrealized profit and loss into realized profit and loss. Option positions do not settle. Delivery is a one-time event that occurs when a futures or options contract expires

  • any remaining open position is closed at the delivery price. Delivery does not apply to perpetual or spot instruments. Both events take place at 08:00 UTC, which is why they are sometimes conflated. Results can be filtered by settlement type and timestamp. Use pagination parameters (count and continuation) to retrieve large settlement histories. This data is useful for analyzing historical contract settlements and understanding market events. Note on profit_loss and session_profit_loss: Because this is a public endpoint, these fields are platform-wide aggregates, not per-account values. profit_loss is the sum of realized P&L of all position holders at the settlement price. session_profit_loss is the sum of each holder's total session P&L (realized + unrealized) across all participants.

JSON-RPC: public/get_last_settlements_by_currency

Parameters ​

ParameterType
paramsAdvTradeGlobalGetLastSettlementsByCurrencyRequest

Returns ​

Promise<AdvTradeGlobalGetLastSettlementsByCurrencyResult>


getLastSettlementsByInstrument() ​

ts
getLastSettlementsByInstrument(params: AdvTradeGlobalGetLastSettlementsByInstrumentRequest): Promise<AdvTradeGlobalGetLastSettlementsByInstrumentResult>;

Get Last Settlements By Instrument

Retrieves historical settlement, delivery, and bankruptcy events for a specific instrument. Settlement vs. delivery: Settlement is a daily event (at 08:00 UTC) for futures and perpetual positions that converts unrealized profit and loss into realized profit and loss. Option positions do not settle. Delivery is a one-time event that occurs when a futures or options contract expires - any remaining open position is closed at the delivery price. Delivery does not apply to perpetual or spot instruments. Both events take place at 08:00 UTC, which is why they are sometimes conflated. Results can be filtered by settlement type and timestamp. Use pagination parameters (count and continuation) to retrieve large settlement histories. This method is useful for tracking settlement history for a specific instrument. Note on profit_loss and session_profit_loss: Because this is a public endpoint, these fields are platform-wide aggregates, not per-account values. profit_loss is the sum of realized P&L of all position holders at the settlement price. session_profit_loss is the sum of each holder's total session P&L (realized

  • unrealized) across all participants.

JSON-RPC: public/get_last_settlements_by_instrument

Parameters ​

ParameterType
paramsAdvTradeGlobalGetLastSettlementsByInstrumentRequest

Returns ​

Promise<AdvTradeGlobalGetLastSettlementsByInstrumentResult>


getLastTradesByCurrency() ​

ts
getLastTradesByCurrency(params: AdvTradeGlobalGetLastTradesByCurrencyRequest): Promise<AdvTradeGlobalGetLastTradesByCurrencyResult>;

Get Last Trades By Currency

Retrieves the latest trades that have occurred for instruments in a specific currency. Returns trade details including price, amount, direction, timestamp, and trade ID for all instruments in the currency. Results can be filtered by instrument kind and trade ID range or timestamp range. Use the count parameter to limit the number of trades returned, and sorting to control the order (ascending or descending by trade ID). Note: For currencies with spot instruments routed to Coinbase Exchange, this call is not supported when kind is spot or any - and any is the default when kind is omitted. A currency counts as routed when it is the base or the quote of a routed pair. Other kinds are unaffected. Use Get product trades directly for full trade history by instrument.

JSON-RPC: public/get_last_trades_by_currency

Parameters ​

ParameterType
paramsAdvTradeGlobalGetLastTradesByCurrencyRequest

Returns ​

Promise<AdvTradeGlobalGetLastTradesByCurrencyResult>


getLastTradesByCurrencyAndTime() ​

ts
getLastTradesByCurrencyAndTime(params: AdvTradeGlobalGetLastTradesByCurrencyAndTimeRequest): Promise<AdvTradeGlobalGetLastTradesByCurrencyAndTimeResult>;

Get Last Trades By Currency And Time

Retrieves the latest trades that have occurred for instruments in a specific currency within a specified time range. Returns trade details including price, amount, direction, timestamp, and trade ID. Results can be filtered by instrument kind. Use the count parameter to limit the number of trades returned, and sorting to control the order (ascending or descending by trade ID). Note: For currencies with spot instruments routed to Coinbase Exchange, this call is not supported when kind is spot or any - and any is the default when kind is omitted. A currency counts as routed when it is the base or the quote of a routed pair. Other kinds are unaffected. Use Get product trades directly for full trade history by instrument.

JSON-RPC: public/get_last_trades_by_currency_and_time

Parameters ​

ParameterType
paramsAdvTradeGlobalGetLastTradesByCurrencyAndTimeRequest

Returns ​

Promise<AdvTradeGlobalGetLastTradesByCurrencyAndTimeResult>


getLastTradesByInstrument() ​

ts
getLastTradesByInstrument(params: AdvTradeGlobalGetLastTradesByInstrumentRequest): Promise<AdvTradeGlobalGetLastTradesByInstrumentResult>;

Get Last Trades By Instrument

Retrieves the latest trades that have occurred for a specific instrument. Returns trade details including price, amount, direction, timestamp, and trade ID. Results can be filtered by sequence number range or timestamp range. Use the count parameter to limit the number of trades returned, and sorting to control the order (ascending or descending by trade ID). Note: For spot instruments routed to Coinbase Exchange, this call is not supported. Use Get product trades directly for full trade history.

JSON-RPC: public/get_last_trades_by_instrument

Parameters ​

ParameterType
paramsAdvTradeGlobalGetLastTradesByInstrumentRequest

Returns ​

Promise<AdvTradeGlobalGetLastTradesByInstrumentResult>


getLastTradesByInstrumentAndTime() ​

ts
getLastTradesByInstrumentAndTime(params: AdvTradeGlobalGetLastTradesByInstrumentAndTimeRequest): Promise<AdvTradeGlobalGetLastTradesByInstrumentAndTimeResult>;

Get Last Trades By Instrument And Time

Retrieves the latest trades that have occurred for a specific instrument within a specified time range. Returns trade details including price, amount, direction, timestamp, and trade ID. Use the count parameter to limit the number of trades returned, and sorting to control the order (ascending or descending by trade ID). This method is useful for analyzing trading activity over specific time periods. Note: For spot instruments routed to Coinbase Exchange, this call is not supported. Use Get product trades directly for full trade history.

JSON-RPC: public/get_last_trades_by_instrument_and_time

Parameters ​

ParameterType
paramsAdvTradeGlobalGetLastTradesByInstrumentAndTimeRequest

Returns ​

Promise<AdvTradeGlobalGetLastTradesByInstrumentAndTimeResult>


getLegPrices() ​

ts
getLegPrices(params: AdvTradeGlobalGetLegPricesRequest): Promise<AdvTradeGlobalGetLegPricesResult>;

Get Leg Prices

Returns individual leg prices for a given combo structure based on an aggregated price of the strategy and the mark prices of the individual legs. Note: Leg prices change dynamically with mark price fluctuations, and the algorithm is calibrated only for conventional option structures and future spreads. This method supports both inverse strategies and known linear structures within a single currency pair.

JSON-RPC: private/get_leg_prices

Parameters ​

ParameterType
paramsAdvTradeGlobalGetLegPricesRequest

Returns ​

Promise<AdvTradeGlobalGetLegPricesResult>


getMargins() ​

ts
getMargins(params: AdvTradeGlobalGetMarginsRequest): Promise<AdvTradeGlobalGetMarginsResult>;

Get Margins

Calculates margin requirements for a hypothetical order on a given instrument. Returns initial margin and maintenance margin for the specified instrument, quantity, and price. This method is useful for estimating margin requirements before placing an order, helping to ensure sufficient funds are available and understanding the margin impact of potential trades.

JSON-RPC: private/get_margins

Parameters ​

ParameterType
paramsAdvTradeGlobalGetMarginsRequest

Returns ​

Promise<AdvTradeGlobalGetMarginsResult>


getMarkPriceHistory() ​

ts
getMarkPriceHistory(params: AdvTradeGlobalGetMarkPriceHistoryRequest): Promise<number[][]>;

Get Mark Price History

Retrieves 5-minute historical mark price data for an instrument. Mark prices are used for margin calculations and position valuations. Note: Currently, mark price history is available only for a subset of options that participate in volatility index calculations. All other instruments, including futures and perpetuals, will return an empty list.

JSON-RPC: public/get_mark_price_history

Parameters ​

ParameterType
paramsAdvTradeGlobalGetMarkPriceHistoryRequest

Returns ​

Promise<number[][]>


getOpenOrders() ​

ts
getOpenOrders(params?: AdvTradeGlobalGetOpenOrdersRequest): Promise<AdvTradeGlobalOrder[]>;

Get Open Orders

Retrieves a list of all open orders for the authenticated account across all currencies. Open orders are orders that have been placed but not yet filled or cancelled. Results can be filtered by instrument kind and order type. This method provides a comprehensive view of all active orders.

JSON-RPC: private/get_open_orders

Parameters ​

ParameterType
params?AdvTradeGlobalGetOpenOrdersRequest

Returns ​

Promise<AdvTradeGlobalOrder[]>


getOpenOrdersByCurrency() ​

ts
getOpenOrdersByCurrency(params: AdvTradeGlobalGetOpenOrdersByCurrencyRequest): Promise<AdvTradeGlobalOrder[]>;

Get Open Orders By Currency

Retrieves a list of all open orders for a specific currency. Open orders are orders that have been placed but not yet filled or cancelled. Results can be filtered by instrument kind and order type. This method provides a view of all active orders within a currency.

JSON-RPC: private/get_open_orders_by_currency

Parameters ​

ParameterType
paramsAdvTradeGlobalGetOpenOrdersByCurrencyRequest

Returns ​

Promise<AdvTradeGlobalOrder[]>


getOpenOrdersByInstrument() ​

ts
getOpenOrdersByInstrument(params: AdvTradeGlobalGetOpenOrdersByInstrumentRequest): Promise<AdvTradeGlobalOrder[]>;

Get Open Orders By Instrument

Retrieves a list of all open orders for a specific instrument. Open orders are orders that have been placed but not yet filled or cancelled. Results can be filtered by order type. This method is useful for checking active orders for a particular instrument.

JSON-RPC: private/get_open_orders_by_instrument

Parameters ​

ParameterType
paramsAdvTradeGlobalGetOpenOrdersByInstrumentRequest

Returns ​

Promise<AdvTradeGlobalOrder[]>


getOpenOrdersByLabel() ​

ts
getOpenOrdersByLabel(params: AdvTradeGlobalGetOpenOrdersByLabelRequest): Promise<AdvTradeGlobalOrder[]>;

Get Open Orders By Label

Retrieves a list of all open orders that have a specific label within a given currency. This is useful for tracking and managing groups of related orders that share the same label. Open orders are orders that have been placed but not yet filled or cancelled. The label helps organize and identify related orders.

JSON-RPC: private/get_open_orders_by_label

Parameters ​

ParameterType
paramsAdvTradeGlobalGetOpenOrdersByLabelRequest

Returns ​

Promise<AdvTradeGlobalOrder[]>


getOrderBook() ​

ts
getOrderBook(params: AdvTradeGlobalGetOrderBookRequest): Promise<AdvTradeGlobalTickerNotificationWithBidsAndAsks>;

Get Order Book

Retrieves the order book (bids and asks) for a given instrument, along with other market values such as best bid/ask prices, last trade price, mark price, and index price. The order book depth can be controlled using the depth parameter, which accepts values from 1 to 10000. The response includes price levels sorted by price (bids descending, asks ascending).

Replaces GET /product_book

JSON-RPC: public/get_order_book

Parameters ​

ParameterType
paramsAdvTradeGlobalGetOrderBookRequest

Returns ​

Promise<AdvTradeGlobalTickerNotificationWithBidsAndAsks>


getOrderBookByInstrumentId() ​

ts
getOrderBookByInstrumentId(params: AdvTradeGlobalGetOrderBookByInstrumentIdRequest): Promise<AdvTradeGlobalTickerNotificationWithBidsAndAsks>;

Get Order Book By Instrument Id

Retrieves the order book (bids and asks) for a given instrument ID, along with other market values such as best bid/ask prices, last trade price, mark price, and index price. This method is similar to get_order_book but uses instrument ID instead of instrument name. The order book depth can be controlled using the depth parameter, which accepts values from 1 to 10000.

JSON-RPC: public/get_order_book_by_instrument_id

Parameters ​

ParameterType
paramsAdvTradeGlobalGetOrderBookByInstrumentIdRequest

Returns ​

Promise<AdvTradeGlobalTickerNotificationWithBidsAndAsks>


getOrderHistoryByCurrency() ​

ts
getOrderHistoryByCurrency(params: AdvTradeGlobalGetOrderHistoryByCurrencyRequest): Promise<AdvTradeGlobalOrder[]>;

Get Order History By Currency

Retrieves the order history for a specific currency. The history includes orders that have been partially or fully filled, as well as cancelled orders (if include_unfilled_orders is set to true). Results can be filtered by instrument kind and paginated using offset and count parameters, or using continuation tokens. Use include_old_orders to include orders from before a certain date, and historical to retrieve historical order data.

Replaces GET /orders/historical/batch

JSON-RPC: private/get_order_history_by_currency

Parameters ​

ParameterType
paramsAdvTradeGlobalGetOrderHistoryByCurrencyRequest

Returns ​

Promise<AdvTradeGlobalOrder[]>


getOrderHistoryByInstrument() ​

ts
getOrderHistoryByInstrument(params: AdvTradeGlobalGetOrderHistoryByInstrumentRequest): Promise<AdvTradeGlobalOrder[]>;

Get Order History By Instrument

Retrieves the order history for a specific instrument. The history includes orders that have been partially or fully filled, as well as cancelled orders (if include_unfilled_orders is set to true). Results can be paginated using offset and count parameters, or using continuation tokens. Use include_old_orders to include orders from before a certain date, and historical to retrieve historical order data.

Replaces GET /orders/historical/batch

JSON-RPC: private/get_order_history_by_instrument

Parameters ​

ParameterType
paramsAdvTradeGlobalGetOrderHistoryByInstrumentRequest

Returns ​

Promise<AdvTradeGlobalOrder[]>


getOrderMarginByIds() ​

ts
getOrderMarginByIds(params: AdvTradeGlobalGetOrderMarginByIdsRequest): Promise<AdvTradeGlobalOrderIdInitialMarginPair[]>;

Get Order Margin By Ids

Retrieves the initial margin requirements for one or more orders identified by their order IDs. Initial margin is the amount of funds required to open a position with these orders. Use this method to inspect the margin requirements of existing orders by order ID. To estimate margin for a proposed order, use getMargins().

JSON-RPC: private/get_order_margin_by_ids

Parameters ​

ParameterType
paramsAdvTradeGlobalGetOrderMarginByIdsRequest

Returns ​

Promise<AdvTradeGlobalOrderIdInitialMarginPair[]>


getOrderState() ​

ts
getOrderState(params: AdvTradeGlobalGetOrderStateRequest): Promise<AdvTradeGlobalOrder>;

Get Order State

Retrieves the current state of an order identified by its order ID. The response includes order details such as status (open, filled, cancelled), filled amount, remaining amount, price, and other order properties. Important Note for Mass Quotes: Quote orders are order-like structures that don't fully translate to normal orders. When checking order state for quotes, the amount field represents the remaining amount, not the original order amount. Note: This method does not support the historical flag and only returns an order that closed within the last 30 minutes (same recency window as historical=false). For orders older than that, use private/get_order_history_by_currency or private/get_order_history_by_instrument with historical=true.

Replaces GET /orders/historical/

JSON-RPC: private/get_order_state

Parameters ​

ParameterType
paramsAdvTradeGlobalGetOrderStateRequest

Returns ​

Promise<AdvTradeGlobalOrder>


getOrderStateByLabel() ​

ts
getOrderStateByLabel(params: AdvTradeGlobalGetOrderStateByLabelRequest): Promise<AdvTradeGlobalOrder[]>;

Get Order State By Label

Retrieves the state of recent orders that have a specific label. This is useful for tracking orders that share the same label, which is helpful for managing related orders. Results are filtered by currency and label. The response includes order details such as status, filled amount, remaining amount, and other order properties for all orders with the specified label. Note: This method does not support the historical flag and only returns orders that closed within the last 30 minutes (same recency window as historical=false). This also applies to a trigger order and the order it creates upon triggering - once either has been closed for more than 30 minutes, it will no longer appear here, even though the same label was carried over between them. For orders older than that, use private/get_order_history_by_currency or private/get_order_history_by_instrument with historical=true.

JSON-RPC: private/get_order_state_by_label

Parameters ​

ParameterType
paramsAdvTradeGlobalGetOrderStateByLabelRequest

Returns ​

Promise<AdvTradeGlobalOrder[]>


getPosition() ​

ts
getPosition(params: AdvTradeGlobalGetPositionRequest): Promise<AdvTradeGlobalPositionWithOpenOrdersMargin>;

Get Position

Retrieves the open position for a specific instrument. Returns detailed position information including size, average entry price, mark price, unrealized P&L, initial margin, maintenance margin, and other position-related metrics. If no position exists for the specified instrument, the response will indicate a zero position.

Replaces GET /intx/positions/{portfolio_uuid}/

JSON-RPC: private/get_position

Parameters ​

ParameterType
paramsAdvTradeGlobalGetPositionRequest

Returns ​

Promise<AdvTradeGlobalPositionWithOpenOrdersMargin>


getPositions() ​

ts
getPositions(params?: AdvTradeGlobalGetPositionsRequest): Promise<AdvTradeGlobalPositionWithOpenOrdersMargin[]>;

Get Positions

Retrieves all open positions for the authenticated account. Returns position details including size, average entry price, mark price, unrealized P&L, initial margin, maintenance margin, and other position-related information. Results can be filtered by currency and instrument kind (future, option, etc.). To retrieve positions for a specific subaccount, use the subaccount_id parameter.

Replaces GET /intx/positions/

JSON-RPC: private/get_positions

Parameters ​

ParameterType
params?AdvTradeGlobalGetPositionsRequest

Returns ​

Promise<AdvTradeGlobalPositionWithOpenOrdersMargin[]>


getPrivate() ​

ts
getPrivate(endpoint: string, params?: object): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?object

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.getPrivate


getSettlementHistoryByCurrency() ​

ts
getSettlementHistoryByCurrency(params: AdvTradeGlobalGetSettlementHistoryByCurrencyRequest): Promise<AdvTradeGlobalGetSettlementHistoryByCurrencyResult>;

Get Settlement History By Currency

Retrieves settlement, delivery, and bankruptcy events that have affected your account for a specific currency. Settlement vs. delivery: Settlement is a daily event (at 08:00 UTC) for futures and perpetual positions that converts unrealized profit and loss into realized profit and loss. Option positions do not settle. Delivery is a one-time event that occurs when a futures or options contract expires

  • any remaining open position is closed at the delivery price. Delivery does not apply to perpetual or spot instruments. Both events take place at 08:00 UTC, which is why they are sometimes conflated. Results can be filtered by settlement type and timestamp. Use pagination parameters (count and continuation) to retrieve large settlement histories. This data is useful for tracking account-affecting settlement events and understanding how contract expirations impact your account.

JSON-RPC: private/get_settlement_history_by_currency

Parameters ​

ParameterType
paramsAdvTradeGlobalGetSettlementHistoryByCurrencyRequest

Returns ​

Promise<AdvTradeGlobalGetSettlementHistoryByCurrencyResult>


getSettlementHistoryByInstrument() ​

ts
getSettlementHistoryByInstrument(params: AdvTradeGlobalGetSettlementHistoryByInstrumentRequest): Promise<AdvTradeGlobalGetSettlementHistoryByInstrumentResult>;

Get Settlement History By Instrument

Retrieves settlement, delivery, and bankruptcy events for a specific instrument that have affected your account. Settlement vs. delivery: Settlement is a daily event (at 08:00 UTC) for futures and perpetual positions that converts unrealized profit and loss into realized profit and loss. Option positions do not settle. Delivery is a one-time event that occurs when a futures or options contract expires

  • any remaining open position is closed at the delivery price. Delivery does not apply to perpetual or spot instruments. Both events take place at 08:00 UTC, which is why they are sometimes conflated. Results can be filtered by settlement type and timestamp. Use pagination parameters (count and continuation) to retrieve large settlement histories. This method is useful for tracking settlement events for a specific instrument.

JSON-RPC: private/get_settlement_history_by_instrument

Parameters ​

ParameterType
paramsAdvTradeGlobalGetSettlementHistoryByInstrumentRequest

Returns ​

Promise<AdvTradeGlobalGetSettlementHistoryByInstrumentResult>


getSignTimestampMs() ​

ts
getSignTimestampMs(): number;

Timestamp used to sign the request. Override this method to implement your own timestamp/sync mechanism

Returns ​

number

Inherited from ​

BaseRestClient.getSignTimestampMs


getStatus() ​

ts
getStatus(): Promise<AdvTradeGlobalGetStatusResult>;

Get Status

Method used to get information about locked currencies

JSON-RPC: public/status

Returns ​

Promise<AdvTradeGlobalGetStatusResult>


getSupportedIndexNames() ​

ts
getSupportedIndexNames(params?: AdvTradeGlobalGetSupportedIndexNamesRequest): Promise<AdvTradeGlobalGetSupportedIndexNamesItem[]>;

Get Supported Index Names

Retrieves the identifiers (names) of all supported price indexes, optionally filtered by index type. Price indexes are reference prices used for mark price calculations, settlement, and other market operations. Use the type parameter to filter indexes by type (e.g., spot, futures, etc.). This method helps discover available indexes for use with other API methods.

JSON-RPC: public/get_supported_index_names

Parameters ​

ParameterType
params?AdvTradeGlobalGetSupportedIndexNamesRequest

Returns ​

Promise<AdvTradeGlobalGetSupportedIndexNamesItem[]>


getTicker() ​

ts
getTicker(params: AdvTradeGlobalGetTickerRequest): Promise<AdvTradeGlobalTickerNotification>;

Get Ticker

Retrieves the ticker (24-hour statistics) for a specific instrument. The ticker includes the last trade price, best bid/ask prices, 24-hour high/low, 24-hour volume, open interest, mark price, and other market statistics. This is a lightweight method for getting current market data for a single instrument. For real-time updates, consider using WebSocket subscriptions to ticker channels.

Replaces GET /best_bid_ask

JSON-RPC: public/ticker

Parameters ​

ParameterType
paramsAdvTradeGlobalGetTickerRequest

Returns ​

Promise<AdvTradeGlobalTickerNotification>


getTime() ​

ts
getTime(): Promise<number>;

Get the API server time in milliseconds to compare with your local clock.

JSON-RPC: public/get_time.

Returns ​

Promise<number>


getTradeVolumes() ​

ts
getTradeVolumes(params?: AdvTradeGlobalGetTradeVolumesRequest): Promise<AdvTradeGlobalTradesVolumes[]>;

Get Trade Volumes

Retrieves aggregated 24-hour trade volumes for different instrument types and currencies. The volume statistics include all executed trades across the platform. Note: Position moves are not included in this volume. Block trades and Block RFQ trades are included in the volume calculations. Use the extended parameter to include additional volume statistics and breakdowns. Note: For currencies with spot instruments routed to Coinbase Exchange, spot_volume is omitted, as are spot_volume_7d and spot_volume_30d when extended is used. Use Get all product volume for venue spot volume.

JSON-RPC: public/get_trade_volumes

Parameters ​

ParameterType
params?AdvTradeGlobalGetTradeVolumesRequest

Returns ​

Promise<AdvTradeGlobalTradesVolumes[]>


getTradingviewChartData() ​

ts
getTradingviewChartData(params: AdvTradeGlobalGetTradingviewChartDataRequest): Promise<AdvTradeGlobalGetTradingviewChartDataResult>;

Get Tradingview Chart Data

Retrieves publicly available market data formatted for generating TradingView-compatible candle charts. The data includes open, high, low, close (OHLC) prices and volume for specified time intervals. Set resolution to the candle interval in minutes (for example, "1", "5", or "60"), or "1D" for daily candles. This method provides the standard format used by TradingView and other charting platforms. Note: For spot instruments routed to Coinbase Exchange, this call is not supported. Use Get product candles instead.

Replaces GET /products/{product_id}/candles

JSON-RPC: public/get_tradingview_chart_data

Parameters ​

ParameterType
paramsAdvTradeGlobalGetTradingviewChartDataRequest

Returns ​

Promise<AdvTradeGlobalGetTradingviewChartDataResult>


getTransactionLog() ​

ts
getTransactionLog(params: AdvTradeGlobalGetTransactionLogRequest): Promise<AdvTradeGlobalGetTransactionLogResult>;

Get account transactions, including trades, deposits, withdrawals, transfers and fees. Filter by currency, time range or transaction type, use continuation for pagination, and set subaccount_id to query a subaccount. API history extends back to account creation. The sustained rate limit is one request per second.

Starbase trades include starbase_match_id, starbase_order_id and starbase_timestamp. An option that expires out of the money produces only an expiry entry, with no settlement into futures.

JSON-RPC: private/get_transaction_log.

Parameters ​

ParameterType
paramsAdvTradeGlobalGetTransactionLogRequest

Returns ​

Promise<AdvTradeGlobalGetTransactionLogResult>


getTriggerOrderHistory() ​

ts
getTriggerOrderHistory(params: AdvTradeGlobalGetTriggerOrderHistoryRequest): Promise<AdvTradeGlobalGetTriggerOrderHistoryResult>;

Get Trigger Order History

Retrieves a detailed log of all trigger orders (stop orders, take-profit orders, etc.) for the authenticated account. The log includes trigger order creation, activation, execution, and cancellation events. Results can be filtered by currency and instrument name. Use pagination parameters (count and continuation) to retrieve large trigger order histories. This is useful for tracking trigger order activity and debugging trigger order behavior.

JSON-RPC: private/get_trigger_order_history

Parameters ​

ParameterType
paramsAdvTradeGlobalGetTriggerOrderHistoryRequest

Returns ​

Promise<AdvTradeGlobalGetTriggerOrderHistoryResult>


getUserTradesByCurrency() ​

ts
getUserTradesByCurrency(params: AdvTradeGlobalGetUserTradesByCurrencyRequest): Promise<AdvTradeGlobalGetUserTradesByCurrencyResult>;

Get User Trades By Currency

Retrieves the latest user trades that have occurred for instruments in a specific currency. Returns trade details including price, amount, direction, timestamp, trade ID, and order ID for all instruments in the currency. Results can be filtered by instrument kind, trade ID range, or timestamp range. Use the count parameter to limit the number of trades returned, and sorting to control the order. To retrieve trades for a specific subaccount, use the subaccount_id parameter. Use historical to retrieve historical trade data.

Replaces GET /orders/historical/fills

JSON-RPC: private/get_user_trades_by_currency

Parameters ​

ParameterType
paramsAdvTradeGlobalGetUserTradesByCurrencyRequest

Returns ​

Promise<AdvTradeGlobalGetUserTradesByCurrencyResult>


getUserTradesByCurrencyAndTime() ​

ts
getUserTradesByCurrencyAndTime(params: AdvTradeGlobalGetUserTradesByCurrencyAndTimeRequest): Promise<AdvTradeGlobalGetUserTradesByCurrencyAndTimeResult>;

Get User Trades By Currency And Time

Retrieves the latest user trades that have occurred for instruments in a specific currency within a specified time range. Returns trade details including price, amount, direction, timestamp, trade ID, and order ID for all instruments in the currency. Results can be filtered by instrument kind. Use the count parameter to limit the number of trades returned, and sorting to control the order. Use historical to retrieve historical trade data. This method is useful for analyzing trading activity across a currency over specific time periods. Main accounts may use the subaccount_id parameter to retrieve trade data for a specific subaccount (requires mainaccount scope).

Replaces GET /orders/historical/fills

JSON-RPC: private/get_user_trades_by_currency_and_time

Parameters ​

ParameterType
paramsAdvTradeGlobalGetUserTradesByCurrencyAndTimeRequest

Returns ​

Promise<AdvTradeGlobalGetUserTradesByCurrencyAndTimeResult>


getUserTradesByInstrument() ​

ts
getUserTradesByInstrument(params: AdvTradeGlobalGetUserTradesByInstrumentRequest): Promise<AdvTradeGlobalGetUserTradesByInstrumentResult>;

Get User Trades By Instrument

Retrieves the latest user trades that have occurred for a specific instrument. Returns trade details including price, amount, direction, timestamp, trade ID, and order ID. Results can be filtered by sequence number range or timestamp range. Use the count parameter to limit the number of trades returned, and sorting to control the order (ascending or descending by trade ID). Use historical to retrieve historical trade data. Main accounts may use the subaccount_id parameter to retrieve trade data for a specific subaccount (requires mainaccount scope).

Replaces GET /orders/historical/fills

JSON-RPC: private/get_user_trades_by_instrument

Parameters ​

ParameterType
paramsAdvTradeGlobalGetUserTradesByInstrumentRequest

Returns ​

Promise<AdvTradeGlobalGetUserTradesByInstrumentResult>


getUserTradesByInstrumentAndTime() ​

ts
getUserTradesByInstrumentAndTime(params: AdvTradeGlobalGetUserTradesByInstrumentAndTimeRequest): Promise<AdvTradeGlobalGetUserTradesByInstrumentAndTimeResult>;

Get User Trades By Instrument And Time

Retrieves the latest user trades that have occurred for a specific instrument within a specified time range. Returns trade details including price, amount, direction, timestamp, trade ID, and order ID. Use the count parameter to limit the number of trades returned, and sorting to control the order (ascending or descending by trade ID). Use historical to retrieve historical trade data. This method is useful for analyzing trading activity over specific time periods. Main accounts may use the subaccount_id parameter to retrieve trade data for a specific subaccount (requires mainaccount scope).

Replaces GET /orders/historical/fills

JSON-RPC: private/get_user_trades_by_instrument_and_time

Parameters ​

ParameterType
paramsAdvTradeGlobalGetUserTradesByInstrumentAndTimeRequest

Returns ​

Promise<AdvTradeGlobalGetUserTradesByInstrumentAndTimeResult>


getUserTradesByOrder() ​

ts
getUserTradesByOrder(params: AdvTradeGlobalGetUserTradesByOrderRequest): Promise<AdvTradeGlobalUserTrade[]>;

Get User Trades By Order

Retrieves all trades that were executed from a specific order. When an order is filled, it may result in multiple trades (partial fills). This method returns all trades associated with a given order ID. Results can be sorted in ascending or descending order by trade ID. Use historical to retrieve historical trade data. This is useful for tracking how an order was filled and analyzing execution quality. Main accounts may use the subaccount_id parameter to retrieve trade data for a specific subaccount (requires mainaccount scope).

Replaces GET /orders/historical/fills

JSON-RPC: private/get_user_trades_by_order

Parameters ​

ParameterType
paramsAdvTradeGlobalGetUserTradesByOrderRequest

Returns ​

Promise<AdvTradeGlobalUserTrade[]>


getVolatilityIndexData() ​

ts
getVolatilityIndexData(params: AdvTradeGlobalGetVolatilityIndexDataRequest): Promise<AdvTradeGlobalGetVolatilityIndexDataResult>;

Get Volatility Index Data

Retrieves volatility index (VIX) chart data formatted as candles. Volatility indexes measure market expectations of future volatility and are useful for risk assessment and trading strategies. Set resolution to the candle interval in seconds, or "1D" for daily candles. The data shows historical volatility index values over time and is formatted for use in charting applications.

JSON-RPC: public/get_volatility_index_data

Parameters ​

ParameterType
paramsAdvTradeGlobalGetVolatilityIndexDataRequest

Returns ​

Promise<AdvTradeGlobalGetVolatilityIndexDataResult>


invalidateBlockTradeSignature() ​

ts
invalidateBlockTradeSignature(params?: any): Promise<any>;

JSON-RPC wrapper for private/invalidate_block_trade_signature, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


patchPrivate() ​

ts
patchPrivate(endpoint: string, params?: ParamsInRequest): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?ParamsInRequest

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.patchPrivate


post() ​

ts
post(endpoint: string, params?: ParamsInRequest): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?ParamsInRequest

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.post


postPrivate() ​

ts
postPrivate(endpoint: string, params?: ParamsInRequest): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?ParamsInRequest

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.postPrivate


putPrivate() ​

ts
putPrivate(endpoint: string, params?: ParamsInRequest): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?ParamsInRequest

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.putPrivate


rejectBlockTrade() ​

ts
rejectBlockTrade(params?: any): Promise<any>;

JSON-RPC wrapper for private/reject_block_trade, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


simulateBlockTrade() ​

ts
simulateBlockTrade(params?: any): Promise<any>;

JSON-RPC wrapper for private/simulate_block_trade, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>


simulatePme() ​

ts
simulatePme(params: AdvTradeGlobalSimulatePmeRequest): Promise<object>;

Simulate PME

Calculates the Extended Risk Matrix (ERM) and detailed margin information for Portfolio Margin accounts. The ERM provides a comprehensive view of portfolio risk across different scenarios and market conditions. You can calculate the ERM for a specific currency or for the entire Cross-Collateral portfolio. The response includes margin requirements, risk metrics, and scenario analysis that helps assess portfolio risk under various market conditions. Use this method to understand margin requirements and risk exposure before making trading decisions in a Portfolio Margin account.

JSON-RPC: private/pme/simulate

Parameters ​

ParameterType
paramsAdvTradeGlobalSimulatePmeRequest

Returns ​

Promise<object>


simulatePortfolio() ​

ts
simulatePortfolio(params: AdvTradeGlobalSimulatePortfolioRequest): Promise<AdvTradeGlobalSimulatePortfolioResult>;

Simulate Portfolio

Calculates portfolio margin requirements and risk metrics for simulated positions or the current portfolio. This method helps you understand margin requirements before opening new positions or assess the impact of potential trades. You can simulate adding new positions to the current portfolio or calculate margin for a completely simulated portfolio. The response includes initial margin, maintenance margin, available funds, and other risk metrics. Note: This method has a restricted rate limit of not more than once per second due to the computational complexity of portfolio margin calculations.

JSON-RPC: private/simulate_portfolio

Parameters ​

ParameterType
paramsAdvTradeGlobalSimulatePortfolioRequest

Returns ​

Promise<AdvTradeGlobalSimulatePortfolioResult>


submitBuy() ​

ts
submitBuy(params: AdvTradeGlobalPlaceOrderRequest): Promise<AdvTradeGlobalBuyResult>;

Buy

Places a buy order for an instrument. Supports various order types including limit, market, stop, and advanced order types (stop-limit, take-profit, take-profit-limit, trailing-stop, etc.). You can specify order parameters such as price, quantity, time-in-force, post-only, reduce-only, and trigger conditions. Orders can be labeled for easier management and tracking. Note: For spot orders routed to Coinbase Exchange, fills come back asynchronously. It is recommended to receive fills from the user.trades channel.

Replaces POST /orders. Side is the method.

JSON-RPC: private/buy

Parameters ​

ParameterType
paramsAdvTradeGlobalPlaceOrderRequest

Returns ​

Promise<AdvTradeGlobalBuyResult>


submitSell() ​

ts
submitSell(params: AdvTradeGlobalPlaceOrderRequest): Promise<AdvTradeGlobalSellResult>;

Sell

Places a sell order for an instrument. Supports various order types including limit, market, stop, and advanced order types (stop-limit, take-profit, take-profit-limit, trailing-stop, etc.). You can specify order parameters such as price, quantity, time-in-force, post-only, reduce-only, and trigger conditions. Orders can be labeled for easier management and tracking. Market Maker Protection (MMP) can be enabled to prevent excessive quoting. Note: For spot orders routed to Coinbase Exchange, fills come back asynchronously. It is recommended to receive fills from the user.trades channel.

Replaces POST /orders. Side is the method.

JSON-RPC: private/sell

Parameters ​

ParameterType
paramsAdvTradeGlobalPlaceOrderRequest

Returns ​

Promise<AdvTradeGlobalSellResult>


testConnection() ​

ts
testConnection(params?: AdvTradeGlobalTestRequest): Promise<AdvTradeGlobalTestResult>;

Test

Tests the connection to the API server, and returns its version. You can use this to make sure the API is reachable, and matches the expected version.

JSON-RPC: public/test

Parameters ​

ParameterType
params?AdvTradeGlobalTestRequest

Returns ​

Promise<AdvTradeGlobalTestResult>


updateOrder() ​

ts
updateOrder(params: AdvTradeGlobalEditRequest): Promise<AdvTradeGlobalEditResult>;

Edit

Modifies an existing order by changing its price, amount, and/or other properties such as time-in-force, post-only, reduce-only, trigger conditions, or advanced order type. The order is identified by its order ID. Only open orders can be edited. Changes take effect immediately and may result in the order being filled if the new price matches the market. Note: For spot orders routed to Coinbase Exchange, fills come back asynchronously. It is recommended to receive fills from the user.trades channel.

Replaces POST /orders/edit

JSON-RPC: private/edit

Parameters ​

ParameterType
paramsAdvTradeGlobalEditRequest

Returns ​

Promise<AdvTradeGlobalEditResult>


updateOrderByLabel() ​

ts
updateOrderByLabel(params: AdvTradeGlobalEditByLabelRequest): Promise<AdvTradeGlobalEditByLabelResult>;

Edit By Label

Modifies an order identified by its label. This method works only when there is exactly one open order with the specified label. You can change the order's price, amount, and/or other properties such as time-in-force, post-only, reduce-only, trigger conditions, or advanced order type. Changes take effect immediately. Note: For spot orders routed to Coinbase Exchange, fills come back asynchronously. It is recommended to receive fills from the user.trades channel.

Replaces POST /orders/edit

JSON-RPC: private/edit_by_label

Parameters ​

ParameterType
paramsAdvTradeGlobalEditByLabelRequest

Returns ​

Promise<AdvTradeGlobalEditByLabelResult>


verifyBlockTrade() ​

ts
verifyBlockTrade(params?: any): Promise<any>;

JSON-RPC wrapper for private/verify_block_trade, sent as POST /api/v2. Accepts an optional any request body and returns Promise<any>.

Parameters ​

ParameterType
params?any

Returns ​

Promise<any>

Built by Siebly. Open source SDKs for exchange APIs.