diff --git a/pages/developers/indexer/indexer_api.mdx b/pages/developers/indexer/indexer_api.mdx index fd0fa59e..7c67e9ad 100644 --- a/pages/developers/indexer/indexer_api.mdx +++ b/pages/developers/indexer/indexer_api.mdx @@ -5,7 +5,7 @@ Base URLs: * For **the deployment by DYDX token holders**, use https://indexer.dydx.trade/v4 -* For **Testnet**, use https://dydx-testnet.imperator.co/v4 +* For **Testnet**, use https://indexer.v4testnet.dydx.exchange/v4 Note: Messages on Indexer WebSocket feeds are typically more recent than data fetched via Indexer's REST API, because the latter is backed by read replicas of the databases that feed the former. Ordinarily this difference is minimal (less than a second), but it might become prolonged under load. Please see [Indexer Architecture](https://dydx.exchange/blog/v4-deep-dive-indexer) for more information. @@ -27,7 +27,7 @@ headers = { # For the deployment by DYDX token holders, use # baseURL = 'https://indexer.dydx.trade/v4' -baseURL = 'https://dydx-testnet.imperator.co/v4' +baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' r = requests.get(f'{baseURL}/addresses/{address}', headers = headers) @@ -43,7 +43,7 @@ const headers = { // For the deployment by DYDX token holders, use // baseURL = 'https://indexer.dydx.trade/v4' -const baseURL = 'https://dydx-testnet.imperator.co/v4' +const baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' fetch(`${baseURL}/addresses/${address}`, { @@ -160,7 +160,7 @@ headers = { # For the deployment by DYDX token holders, use # baseURL = 'https://indexer.dydx.trade/v4' -baseURL = 'https://dydx-testnet.imperator.co/v4' +baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' r = requests.get(f'{baseURL}/addresses/{address}/subaccountNumber/{subaccountNumber}', headers = headers) @@ -176,7 +176,7 @@ const headers = { // For the deployment by DYDX token holders, use // baseURL = 'https://indexer.dydx.trade/v4' -const baseURL = 'https://dydx-testnet.imperator.co/v4' +const baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' fetch(`${baseURL}/addresses/${address}/subaccountNumber/${subaccountNumber}`, { @@ -289,7 +289,7 @@ headers = { # For the deployment by DYDX token holders, use # baseURL = 'https://indexer.dydx.trade/v4' -baseURL = 'https://dydx-testnet.imperator.co/v4' +baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' r = requests.get(f'{baseURL}/assetPositions', params={ 'address': 'string', 'subaccountNumber': '0' @@ -307,7 +307,7 @@ const headers = { // For the deployment by DYDX token holders, use // baseURL = 'https://indexer.dydx.trade/v4' -const baseURL = 'https://dydx-testnet.imperator.co/v4' +const baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' fetch(`${baseURL}/assetPositions?address=${address}&subaccountNumber=${subaccountNumber}`, { @@ -373,7 +373,7 @@ headers = { # For the deployment by DYDX token holders, use # baseURL = 'https://indexer.dydx.trade/v4' -baseURL = 'https://dydx-testnet.imperator.co/v4' +baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' r = requests.get(f'{baseURL}/candles/perpetualMarkets/{ticker}', params={ 'resolution': '1MIN', 'limit': '0' @@ -391,7 +391,7 @@ const headers = { // For the deployment by DYDX token holders, use // baseURL = 'https://indexer.dydx.trade/v4' -const baseURL = 'https://dydx-testnet.imperator.co/v4' +const baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' fetch(`${baseURL}/candles/perpetualMarkets/{ticker}?resolution=1MIN&limit=0`, { @@ -480,7 +480,7 @@ headers = { # For the deployment by DYDX token holders, use # baseURL = 'https://indexer.dydx.trade/v4' -baseURL = 'https://dydx-testnet.imperator.co/v4' +baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' r = requests.get(f'{baseURL}/screen', params={ 'address': 'string' @@ -498,7 +498,7 @@ const headers = { // For the deployment by DYDX token holders, use // baseURL = 'https://indexer.dydx.trade/v4' -const baseURL = 'https://dydx-testnet.imperator.co/v4' +const baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' fetch(`${baseURL}/screen?address=string`, { @@ -557,7 +557,7 @@ headers = { # For the deployment by DYDX token holders, use # baseURL = 'https://indexer.dydx.trade/v4' -baseURL = 'https://dydx-testnet.imperator.co/v4' +baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' r = requests.get(f'{baseURL}/fills', params={ 'address': 'string', 'subaccountNumber': '0', 'market': 'string', 'marketType': 'PERPETUAL', 'limit': '0' @@ -575,7 +575,7 @@ const headers = { // For the deployment by DYDX token holders, use // baseURL = 'https://indexer.dydx.trade/v4' -const baseURL = 'https://dydx-testnet.imperator.co/v4' +const baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' fetch(`${baseURL}/fills?address=string&subaccountNumber=0&market=string&marketType=PERPETUAL&limit=0`, { @@ -662,7 +662,7 @@ headers = { # For the deployment by DYDX token holders, use # baseURL = 'https://indexer.dydx.trade/v4' -baseURL = 'https://dydx-testnet.imperator.co/v4' +baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' r = requests.get(f'{baseURL}/height', headers = headers) @@ -678,7 +678,7 @@ const headers = { // For the deployment by DYDX token holders, use // baseURL = 'https://indexer.dydx.trade/v4' -const baseURL = 'https://dydx-testnet.imperator.co/v4' +const baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' fetch(`${baseURL}/height`, { @@ -731,7 +731,7 @@ headers = { # For the deployment by DYDX token holders, use # baseURL = 'https://indexer.dydx.trade/v4' -baseURL = 'https://dydx-testnet.imperator.co/v4' +baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' r = requests.get(f'{baseURL}/historicalBlockTradingRewards/{address}', params={ 'limit': '0' @@ -749,7 +749,7 @@ const headers = { // For the deployment by DYDX token holders, use // baseURL = 'https://indexer.dydx.trade/v4' -const baseURL = 'https://dydx-testnet.imperator.co/v4' +const baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' fetch(`${baseURL}/historicalBlockTradingRewards/{address}?limit=0`, { @@ -816,7 +816,7 @@ headers = { # For the deployment by DYDX token holders, use # baseURL = 'https://indexer.dydx.trade/v4' -baseURL = 'https://dydx-testnet.imperator.co/v4' +baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' r = requests.get(f'{baseURL}/historicalFunding/{ticker}', params={ 'limit': '0' @@ -834,7 +834,7 @@ const headers = { // For the deployment by DYDX token holders, use // baseURL = 'https://indexer.dydx.trade/v4' -const baseURL = 'https://dydx-testnet.imperator.co/v4' +const baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' fetch(`${baseURL}/historicalFunding/{ticker}?limit=0`, { @@ -903,7 +903,7 @@ headers = { # For the deployment by DYDX token holders, use # baseURL = 'https://indexer.dydx.trade/v4' -baseURL = 'https://dydx-testnet.imperator.co/v4' +baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' r = requests.get(f'{baseURL}/historical-pnl', params={ 'address': 'string', 'subaccountNumber': '0', 'limit': '0' @@ -921,7 +921,7 @@ const headers = { // For the deployment by DYDX token holders, use // baseURL = 'https://indexer.dydx.trade/v4' -const baseURL = 'https://dydx-testnet.imperator.co/v4' +const baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' fetch(`${baseURL}/historical-pnl?address=string&subaccountNumber=0&limit=0`, { @@ -996,7 +996,7 @@ headers = { # For the deployment by DYDX token holders, use # baseURL = 'https://indexer.dydx.trade/v4' -baseURL = 'https://dydx-testnet.imperator.co/v4' +baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' r = requests.get(f'{baseURL}/historicalTradingRewardAggregations/{address}', params={ 'period': 'DAILY', 'limit': '0' @@ -1014,7 +1014,7 @@ const headers = { // For the deployment by DYDX token holders, use // baseURL = 'https://indexer.dydx.trade/v4' -const baseURL = 'https://dydx-testnet.imperator.co/v4' +const baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' fetch(`${baseURL}/historicalTradingRewardAggregations/{address}?period=DAILY&limit=0`, { @@ -1093,7 +1093,7 @@ headers = { # For the deployment by DYDX token holders, use # baseURL = 'https://indexer.dydx.trade/v4' -baseURL = 'https://dydx-testnet.imperator.co/v4' +baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' r = requests.get(f'{baseURL}/orderbooks/perpetualMarket/{ticker}', headers = headers) @@ -1109,7 +1109,7 @@ const headers = { // For the deployment by DYDX token holders, use // baseURL = 'https://indexer.dydx.trade/v4' -const baseURL = 'https://dydx-testnet.imperator.co/v4' +const baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' fetch(`${baseURL}/orderbooks/perpetualMarket/{ticker}`, { @@ -1178,7 +1178,7 @@ headers = { # For the deployment by DYDX token holders, use # baseURL = 'https://indexer.dydx.trade/v4' -baseURL = 'https://dydx-testnet.imperator.co/v4' +baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' r = requests.get(f'{baseURL}/orders', params={ 'address': 'string', 'subaccountNumber': '0', 'limit': '0' @@ -1196,7 +1196,7 @@ const headers = { // For the deployment by DYDX token holders, use // baseURL = 'https://indexer.dydx.trade/v4' -const baseURL = 'https://dydx-testnet.imperator.co/v4' +const baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' fetch(`${baseURL}/orders?address=string&subaccountNumber=0&limit=0`, { @@ -1376,7 +1376,7 @@ headers = { # For the deployment by DYDX token holders, use # baseURL = 'https://indexer.dydx.trade/v4' -baseURL = 'https://dydx-testnet.imperator.co/v4' +baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' r = requests.get(f'{baseURL}/orders/{orderId}', headers = headers) @@ -1392,7 +1392,7 @@ const headers = { // For the deployment by DYDX token holders, use // baseURL = 'https://indexer.dydx.trade/v4' -const baseURL = 'https://dydx-testnet.imperator.co/v4' +const baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' fetch(`${baseURL}/orders/{orderId}`, { @@ -1471,7 +1471,7 @@ headers = { # For the deployment by DYDX token holders, use # baseURL = 'https://indexer.dydx.trade/v4' -baseURL = 'https://dydx-testnet.imperator.co/v4' +baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' r = requests.get(f'{baseURL}/perpetualMarkets', params={ 'limit': '0' @@ -1489,7 +1489,7 @@ const headers = { // For the deployment by DYDX token holders, use // baseURL = 'https://indexer.dydx.trade/v4' -const baseURL = 'https://dydx-testnet.imperator.co/v4' +const baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' fetch(`${baseURL}/perpetualMarkets?limit=0`, { @@ -1587,7 +1587,7 @@ headers = { # For the deployment by DYDX token holders, use # baseURL = 'https://indexer.dydx.trade/v4' -baseURL = 'https://dydx-testnet.imperator.co/v4' +baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' r = requests.get(f'{baseURL}/perpetualPositions', params={ 'address': 'string', 'subaccountNumber': '0', 'status': [ @@ -1607,7 +1607,7 @@ const headers = { // For the deployment by DYDX token holders, use // baseURL = 'https://indexer.dydx.trade/v4' -const baseURL = 'https://dydx-testnet.imperator.co/v4' +const baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' fetch(`${baseURL}/perpetualPositions?address=string&subaccountNumber=0&status=OPEN&limit=0`, { @@ -1696,7 +1696,7 @@ headers = { # For the deployment by DYDX token holders, use # baseURL = 'https://indexer.dydx.trade/v4' -baseURL = 'https://dydx-testnet.imperator.co/v4' +baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' r = requests.get(f'{baseURL}/sparklines', params={ 'timePeriod': 'ONE_DAY' @@ -1714,7 +1714,7 @@ const headers = { // For the deployment by DYDX token holders, use // baseURL = 'https://indexer.dydx.trade/v4' -const baseURL = 'https://dydx-testnet.imperator.co/v4' +const baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' fetch(`${baseURL}/sparklines?timePeriod=ONE_DAY`, { @@ -1784,7 +1784,7 @@ headers = { # For the deployment by DYDX token holders, use # baseURL = 'https://indexer.dydx.trade/v4' -baseURL = 'https://dydx-testnet.imperator.co/v4' +baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' r = requests.get(f'{baseURL}/time', headers = headers) @@ -1800,7 +1800,7 @@ const headers = { // For the deployment by DYDX token holders, use // baseURL = 'https://indexer.dydx.trade/v4' -const baseURL = 'https://dydx-testnet.imperator.co/v4' +const baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' fetch(`${baseURL}/time`, { @@ -1853,7 +1853,7 @@ headers = { # For the deployment by DYDX token holders, use # baseURL = 'https://indexer.dydx.trade/v4' -baseURL = 'https://dydx-testnet.imperator.co/v4' +baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' r = requests.get(f'{baseURL}/trades/perpetualMarket/{ticker}', params={ 'limit': '0' @@ -1871,7 +1871,7 @@ const headers = { // For the deployment by DYDX token holders, use // baseURL = 'https://indexer.dydx.trade/v4' -const baseURL = 'https://dydx-testnet.imperator.co/v4' +const baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' fetch(`${baseURL}/trades/perpetualMarket/{ticker}?limit=0`, { @@ -1942,7 +1942,7 @@ headers = { # For the deployment by DYDX token holders, use # baseURL = 'https://indexer.dydx.trade/v4' -baseURL = 'https://dydx-testnet.imperator.co/v4' +baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' r = requests.get(f'{baseURL}/transfers', params={ 'address': 'string', 'subaccountNumber': '0', 'limit': '0' @@ -1960,7 +1960,7 @@ const headers = { // For the deployment by DYDX token holders, use // baseURL = 'https://indexer.dydx.trade/v4' -const baseURL = 'https://dydx-testnet.imperator.co/v4' +const baseURL = 'https://indexer.v4testnet.dydx.exchange/v4' fetch(`${baseURL}/transfers?address=string&subaccountNumber=0&limit=0`, {