Back to Ccxt

Dydx

wiki/exchanges-implicit/dydx.md

4.5.646.5 KB
Original Source

Every endpoint in dydx's api definition is exposed as an implicit method — a thin, generated wrapper around the raw exchange endpoint. Use these for exchange-specific functionality the CCXT API does not cover.

These methods are available in every CCXT language — TypeScript, JavaScript, Python, PHP, C# and Go. Call them by the camelCase name shown in the tables below (e.g. indexerGetAddressesAddress); the snake_case alias (indexer_get_addresses_address) also works in JavaScript, Python and PHP, and Go uses the PascalCase form (IndexerGetAddressesAddress). Switch tabs for the call in each language:

<!-- tabs:start -->

JavaScript

javascript
const dydx = new ccxt.dydx ();
const response = await dydx.indexerGetAddressesAddress (params);

TypeScript

typescript
import ccxt from 'ccxt';
const dydx = new ccxt.dydx ();
const response = await dydx.indexerGetAddressesAddress (params);

Python

python
import ccxt
dydx = ccxt.dydx()
response = dydx.indexer_get_addresses_address(params)

PHP

php
$dydx = new \ccxt\dydx();
$response = $dydx->indexer_get_addresses_address($params);

C#

csharp
using ccxt;
var dydx = new Dydx();
var response = await dydx.indexerGetAddressesAddress(parameters);

Go

go
dydx := ccxt.NewDydx(nil)
response := <-dydx.IndexerGetAddressesAddress(params)
<!-- tabs:end -->

Path parameters wrapped in {} (e.g. {pair}) are substituted from params; everything else in params is sent as the query string or request body. Cost is the rate-limiter weight of each call.

📚 Official dydx API documentation: docs.dydx.xyz

54 implicit endpoints across 3 access groups.

indexer

Base URL: https://indexer.dydx.trade/v4

MethodHTTPEndpointCost
indexerGetAddressesAddressGETaddresses/{address}1
indexerGetAddressesAddressParentSubaccountNumberNumberGETaddresses/{address}/parentSubaccountNumber/{number}1
indexerGetAddressesAddressSubaccountNumberSubaccountNumberGETaddresses/{address}/subaccountNumber/{subaccountNumber}1
indexerGetAssetPositionsGETassetPositions1
indexerGetAssetPositionsParentSubaccountNumberGETassetPositions/parentSubaccountNumber1
indexerGetCandlesPerpetualMarketsMarketGETcandles/perpetualMarkets/{market}1
indexerGetComplianceScreenAddressGETcompliance/screen/{address}1
indexerGetFillsGETfills1
indexerGetFillsParentSubaccountNumberGETfills/parentSubaccountNumber1
indexerGetFundingPaymentsGETfundingPayments1
indexerGetFundingPaymentsParentSubaccountGETfundingPayments/parentSubaccount1
indexerGetHeightGETheight0.1
indexerGetHistoricalPnlGEThistorical-pnl1
indexerGetHistoricalPnlParentSubaccountNumberGEThistorical-pnl/parentSubaccountNumber1
indexerGetHistoricalBlockTradingRewardsAddressGEThistoricalBlockTradingRewards/{address}1
indexerGetHistoricalFundingMarketGEThistoricalFunding/{market}1
indexerGetHistoricalTradingRewardAggregationsAddressGEThistoricalTradingRewardAggregations/{address}1
indexerGetOrderbooksPerpetualMarketMarketGETorderbooks/perpetualMarket/{market}1
indexerGetOrdersGETorders1
indexerGetOrdersParentSubaccountNumberGETorders/parentSubaccountNumber1
indexerGetOrdersOrderIdGETorders/{orderId}1
indexerGetPerpetualMarketsGETperpetualMarkets1
indexerGetPerpetualPositionsGETperpetualPositions1
indexerGetPerpetualPositionsParentSubaccountNumberGETperpetualPositions/parentSubaccountNumber1
indexerGetScreenGETscreen1
indexerGetSparklinesGETsparklines1
indexerGetTimeGETtime1
indexerGetTradesPerpetualMarketMarketGETtrades/perpetualMarket/{market}1
indexerGetTransfersGETtransfers1
indexerGetTransfersBetweenGETtransfers/between1
indexerGetTransfersParentSubaccountNumberGETtransfers/parentSubaccountNumber1
indexerGetVaultV1MegavaultHistoricalPnlGETvault/v1/megavault/historicalPnl1
indexerGetVaultV1MegavaultPositionsGETvault/v1/megavault/positions1
indexerGetVaultV1VaultsHistoricalPnlGETvault/v1/vaults/historicalPnl1
indexerGetPerpetualMarketSparklinesGETperpetualMarketSparklines1
indexerGetPerpetualMarketsTickerGETperpetualMarkets/{ticker}1
indexerGetPerpetualMarketsTickerOrderbookGETperpetualMarkets/{ticker}/orderbook1
indexerGetTradesPerpetualMarketTickerGETtrades/perpetualMarket/{ticker}1
indexerGetHistoricalFundingTickerGEThistoricalFunding/{ticker}1
indexerGetCandlesTickerResolutionGETcandles/{ticker}/{resolution}1
indexerGetAddressesAddressSubaccountsGETaddresses/{address}/subaccounts1
indexerGetAddressesAddressSubaccountNumberSubaccountNumberAssetPositionsGETaddresses/{address}/subaccountNumber/{subaccountNumber}/assetPositions1
indexerGetAddressesAddressSubaccountNumberSubaccountNumberPerpetualPositionsGETaddresses/{address}/subaccountNumber/{subaccountNumber}/perpetualPositions1
indexerGetAddressesAddressSubaccountNumberSubaccountNumberOrdersGETaddresses/{address}/subaccountNumber/{subaccountNumber}/orders1
indexerGetFillsParentSubaccountGETfills/parentSubaccount1
indexerGetHistoricalPnlParentSubaccountGEThistorical-pnl/parentSubaccount1

nodeRpc

Base URL: https://dydx-ops-rpc.kingnodes.com

MethodHTTPEndpointCost
nodeRpcGetAbciInfoGETabci_info1
nodeRpcGetBlockGETblock1
nodeRpcGetBroadcastTxAsyncGETbroadcast_tx_async1
nodeRpcGetBroadcastTxSyncGETbroadcast_tx_sync1
nodeRpcGetTxGETtx1

nodeRest

Base URL: https://dydx-rest.publicnode.com

MethodHTTPEndpointCost
nodeRestGetCosmosAuthV1beta1AccountInfoDydxAddressGETcosmos/auth/v1beta1/account_info/{dydxAddress}1
nodeRestPostCosmosTxV1beta1EncodePOSTcosmos/tx/v1beta1/encode1
nodeRestPostCosmosTxV1beta1SimulatePOSTcosmos/tx/v1beta1/simulate1