Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update api documentation #781

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 37 additions & 37 deletions indexer/services/comlink/public/api-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Base URLs:

* <a href="https://indexer.v4testnet.dydx.exchange/v4">https://indexer.v4testnet.dydx.exchange/v4</a>
* <a href="https://dydx-testnet.imperator.co/v4">https://dydx-testnet.imperator.co/v4</a>

# Authentication

Expand All @@ -23,7 +23,7 @@ headers = {
'Accept': 'application/json'
}

r = requests.get('https://indexer.v4testnet.dydx.exchange/v4/addresses/{address}', headers = headers)
r = requests.get('https://dydx-testnet.imperator.co/v4/addresses/{address}', headers = headers)

print(r.json())

Expand All @@ -35,7 +35,7 @@ const headers = {
'Accept':'application/json'
};

fetch('https://indexer.v4testnet.dydx.exchange/v4/addresses/{address}',
fetch('https://dydx-testnet.imperator.co/v4/addresses/{address}',
{
method: 'GET',

Expand Down Expand Up @@ -193,7 +193,7 @@ headers = {
'Accept': 'application/json'
}

r = requests.get('https://indexer.v4testnet.dydx.exchange/v4/addresses/{address}/subaccountNumber/{subaccountNumber}', headers = headers)
r = requests.get('https://dydx-testnet.imperator.co/v4/addresses/{address}/subaccountNumber/{subaccountNumber}', headers = headers)

print(r.json())

Expand All @@ -205,7 +205,7 @@ const headers = {
'Accept':'application/json'
};

fetch('https://indexer.v4testnet.dydx.exchange/v4/addresses/{address}/subaccountNumber/{subaccountNumber}',
fetch('https://dydx-testnet.imperator.co/v4/addresses/{address}/subaccountNumber/{subaccountNumber}',
{
method: 'GET',

Expand Down Expand Up @@ -314,7 +314,7 @@ headers = {
'Accept': 'application/json'
}

r = requests.get('https://indexer.v4testnet.dydx.exchange/v4/assetPositions', params={
r = requests.get('https://dydx-testnet.imperator.co/v4/assetPositions', params={
'address': 'string', 'subaccountNumber': '0'
}, headers = headers)

Expand All @@ -328,7 +328,7 @@ const headers = {
'Accept':'application/json'
};

fetch('https://indexer.v4testnet.dydx.exchange/v4/assetPositions?address=string&subaccountNumber=0',
fetch('https://dydx-testnet.imperator.co/v4/assetPositions?address=string&subaccountNumber=0',
{
method: 'GET',

Expand Down Expand Up @@ -390,7 +390,7 @@ headers = {
'Accept': 'application/json'
}

r = requests.get('https://indexer.v4testnet.dydx.exchange/v4/candles/perpetualMarkets/{ticker}', params={
r = requests.get('https://dydx-testnet.imperator.co/v4/candles/perpetualMarkets/{ticker}', params={
'resolution': '1MIN', 'limit': '0'
}, headers = headers)

Expand All @@ -404,7 +404,7 @@ const headers = {
'Accept':'application/json'
};

fetch('https://indexer.v4testnet.dydx.exchange/v4/candles/perpetualMarkets/{ticker}?resolution=1MIN&limit=0',
fetch('https://dydx-testnet.imperator.co/v4/candles/perpetualMarkets/{ticker}?resolution=1MIN&limit=0',
{
method: 'GET',

Expand Down Expand Up @@ -489,7 +489,7 @@ headers = {
'Accept': 'application/json'
}

r = requests.get('https://indexer.v4testnet.dydx.exchange/v4/screen', params={
r = requests.get('https://dydx-testnet.imperator.co/v4/screen', params={
'address': 'string'
}, headers = headers)

Expand All @@ -503,7 +503,7 @@ const headers = {
'Accept':'application/json'
};

fetch('https://indexer.v4testnet.dydx.exchange/v4/screen?address=string',
fetch('https://dydx-testnet.imperator.co/v4/screen?address=string',
{
method: 'GET',

Expand Down Expand Up @@ -558,7 +558,7 @@ headers = {
'Accept': 'application/json'
}

r = requests.get('https://indexer.v4testnet.dydx.exchange/v4/fills', params={
r = requests.get('https://dydx-testnet.imperator.co/v4/fills', params={
'address': 'string', 'subaccountNumber': '0', 'market': 'string', 'marketType': 'PERPETUAL', 'limit': '0'
}, headers = headers)

Expand All @@ -572,7 +572,7 @@ const headers = {
'Accept':'application/json'
};

fetch('https://indexer.v4testnet.dydx.exchange/v4/fills?address=string&subaccountNumber=0&market=string&marketType=PERPETUAL&limit=0',
fetch('https://dydx-testnet.imperator.co/v4/fills?address=string&subaccountNumber=0&market=string&marketType=PERPETUAL&limit=0',
{
method: 'GET',

Expand Down Expand Up @@ -655,7 +655,7 @@ headers = {
'Accept': 'application/json'
}

r = requests.get('https://indexer.v4testnet.dydx.exchange/v4/height', headers = headers)
r = requests.get('https://dydx-testnet.imperator.co/v4/height', headers = headers)

print(r.json())

Expand All @@ -667,7 +667,7 @@ const headers = {
'Accept':'application/json'
};

fetch('https://indexer.v4testnet.dydx.exchange/v4/height',
fetch('https://dydx-testnet.imperator.co/v4/height',
{
method: 'GET',

Expand Down Expand Up @@ -716,7 +716,7 @@ headers = {
'Accept': 'application/json'
}

r = requests.get('https://indexer.v4testnet.dydx.exchange/v4/historicalFunding/{ticker}', params={
r = requests.get('https://dydx-testnet.imperator.co/v4/historicalFunding/{ticker}', params={
'limit': '0'
}, headers = headers)

Expand All @@ -730,7 +730,7 @@ const headers = {
'Accept':'application/json'
};

fetch('https://indexer.v4testnet.dydx.exchange/v4/historicalFunding/{ticker}?limit=0',
fetch('https://dydx-testnet.imperator.co/v4/historicalFunding/{ticker}?limit=0',
{
method: 'GET',

Expand Down Expand Up @@ -795,7 +795,7 @@ headers = {
'Accept': 'application/json'
}

r = requests.get('https://indexer.v4testnet.dydx.exchange/v4/historical-pnl', params={
r = requests.get('https://dydx-testnet.imperator.co/v4/historical-pnl', params={
'address': 'string', 'subaccountNumber': '0', 'limit': '0'
}, headers = headers)

Expand All @@ -809,7 +809,7 @@ const headers = {
'Accept':'application/json'
};

fetch('https://indexer.v4testnet.dydx.exchange/v4/historical-pnl?address=string&subaccountNumber=0&limit=0',
fetch('https://dydx-testnet.imperator.co/v4/historical-pnl?address=string&subaccountNumber=0&limit=0',
{
method: 'GET',

Expand Down Expand Up @@ -880,7 +880,7 @@ headers = {
'Accept': 'application/json'
}

r = requests.get('https://indexer.v4testnet.dydx.exchange/v4/orderbooks/perpetualMarket/{ticker}', headers = headers)
r = requests.get('https://dydx-testnet.imperator.co/v4/orderbooks/perpetualMarket/{ticker}', headers = headers)

print(r.json())

Expand All @@ -892,7 +892,7 @@ const headers = {
'Accept':'application/json'
};

fetch('https://indexer.v4testnet.dydx.exchange/v4/orderbooks/perpetualMarket/{ticker}',
fetch('https://dydx-testnet.imperator.co/v4/orderbooks/perpetualMarket/{ticker}',
{
method: 'GET',

Expand Down Expand Up @@ -957,7 +957,7 @@ headers = {
'Accept': 'application/json'
}

r = requests.get('https://indexer.v4testnet.dydx.exchange/v4/orders', params={
r = requests.get('https://dydx-testnet.imperator.co/v4/orders', params={
'address': 'string', 'subaccountNumber': '0', 'limit': '0'
}, headers = headers)

Expand All @@ -971,7 +971,7 @@ const headers = {
'Accept':'application/json'
};

fetch('https://indexer.v4testnet.dydx.exchange/v4/orders?address=string&subaccountNumber=0&limit=0',
fetch('https://dydx-testnet.imperator.co/v4/orders?address=string&subaccountNumber=0&limit=0',
{
method: 'GET',

Expand Down Expand Up @@ -1147,7 +1147,7 @@ headers = {
'Accept': 'application/json'
}

r = requests.get('https://indexer.v4testnet.dydx.exchange/v4/orders/{orderId}', headers = headers)
r = requests.get('https://dydx-testnet.imperator.co/v4/orders/{orderId}', headers = headers)

print(r.json())

Expand All @@ -1159,7 +1159,7 @@ const headers = {
'Accept':'application/json'
};

fetch('https://indexer.v4testnet.dydx.exchange/v4/orders/{orderId}',
fetch('https://dydx-testnet.imperator.co/v4/orders/{orderId}',
{
method: 'GET',

Expand Down Expand Up @@ -1234,7 +1234,7 @@ headers = {
'Accept': 'application/json'
}

r = requests.get('https://indexer.v4testnet.dydx.exchange/v4/perpetualMarkets', params={
r = requests.get('https://dydx-testnet.imperator.co/v4/perpetualMarkets', params={
'limit': '0'
}, headers = headers)

Expand All @@ -1248,7 +1248,7 @@ const headers = {
'Accept':'application/json'
};

fetch('https://indexer.v4testnet.dydx.exchange/v4/perpetualMarkets?limit=0',
fetch('https://dydx-testnet.imperator.co/v4/perpetualMarkets?limit=0',
{
method: 'GET',

Expand Down Expand Up @@ -1346,7 +1346,7 @@ headers = {
'Accept': 'application/json'
}

r = requests.get('https://indexer.v4testnet.dydx.exchange/v4/perpetualPositions', params={
r = requests.get('https://dydx-testnet.imperator.co/v4/perpetualPositions', params={
'address': 'string', 'subaccountNumber': '0', 'status': [
"OPEN"
], 'limit': '0'
Expand All @@ -1362,7 +1362,7 @@ const headers = {
'Accept':'application/json'
};

fetch('https://indexer.v4testnet.dydx.exchange/v4/perpetualPositions?address=string&subaccountNumber=0&status=OPEN&limit=0',
fetch('https://dydx-testnet.imperator.co/v4/perpetualPositions?address=string&subaccountNumber=0&status=OPEN&limit=0',
{
method: 'GET',

Expand Down Expand Up @@ -1447,7 +1447,7 @@ headers = {
'Accept': 'application/json'
}

r = requests.get('https://indexer.v4testnet.dydx.exchange/v4/sparklines', params={
r = requests.get('https://dydx-testnet.imperator.co/v4/sparklines', params={
'timePeriod': 'ONE_DAY'
}, headers = headers)

Expand All @@ -1461,7 +1461,7 @@ const headers = {
'Accept':'application/json'
};

fetch('https://indexer.v4testnet.dydx.exchange/v4/sparklines?timePeriod=ONE_DAY',
fetch('https://dydx-testnet.imperator.co/v4/sparklines?timePeriod=ONE_DAY',
{
method: 'GET',

Expand Down Expand Up @@ -1527,7 +1527,7 @@ headers = {
'Accept': 'application/json'
}

r = requests.get('https://indexer.v4testnet.dydx.exchange/v4/time', headers = headers)
r = requests.get('https://dydx-testnet.imperator.co/v4/time', headers = headers)

print(r.json())

Expand All @@ -1539,7 +1539,7 @@ const headers = {
'Accept':'application/json'
};

fetch('https://indexer.v4testnet.dydx.exchange/v4/time',
fetch('https://dydx-testnet.imperator.co/v4/time',
{
method: 'GET',

Expand Down Expand Up @@ -1588,7 +1588,7 @@ headers = {
'Accept': 'application/json'
}

r = requests.get('https://indexer.v4testnet.dydx.exchange/v4/trades/perpetualMarket/{ticker}', params={
r = requests.get('https://dydx-testnet.imperator.co/v4/trades/perpetualMarket/{ticker}', params={
'limit': '0'
}, headers = headers)

Expand All @@ -1602,7 +1602,7 @@ const headers = {
'Accept':'application/json'
};

fetch('https://indexer.v4testnet.dydx.exchange/v4/trades/perpetualMarket/{ticker}?limit=0',
fetch('https://dydx-testnet.imperator.co/v4/trades/perpetualMarket/{ticker}?limit=0',
{
method: 'GET',

Expand Down Expand Up @@ -1668,7 +1668,7 @@ headers = {
'Accept': 'application/json'
}

r = requests.get('https://indexer.v4testnet.dydx.exchange/v4/transfers', params={
r = requests.get('https://dydx-testnet.imperator.co/v4/transfers', params={
'address': 'string', 'subaccountNumber': '0', 'limit': '0'
}, headers = headers)

Expand All @@ -1682,7 +1682,7 @@ const headers = {
'Accept':'application/json'
};

fetch('https://indexer.v4testnet.dydx.exchange/v4/transfers?address=string&subaccountNumber=0&limit=0',
fetch('https://dydx-testnet.imperator.co/v4/transfers?address=string&subaccountNumber=0&limit=0',
{
method: 'GET',

Expand Down
2 changes: 1 addition & 1 deletion indexer/services/comlink/public/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1862,7 +1862,7 @@
},
"servers": [
{
"url": "https://indexer.v4testnet.dydx.exchange/v4",
"url": "https://dydx-testnet.imperator.co/v4",
"description": "Public Testnet"
}
]
Expand Down
2 changes: 1 addition & 1 deletion indexer/services/comlink/src/scripts/generate-swagger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ generateSpec({
swaggerDocument.info.version = 'v1.0.0';
swaggerDocument.servers = [
{
url: 'https://indexer.v4testnet.dydx.exchange/v4',
url: 'https://dydx-testnet.imperator.co/v4',
description: 'Public Testnet',
},
];
Expand Down