Endpoint reference
Every endpoint in v1 and what each one costs, on one page, so your browser's find covers the whole surface at once.
Every call is a read-only GET that returns JSON, carries X-Credits-Cost and X-Credits-Remaining, and answers for chain 52014 only.
What each call costs
1,000,000 credits = $1.00.
Every price here is the expensive case, never the cheap one. A price set on the cheap path would under-charge exactly when the call is dearest to serve, and the point of publishing a number is that you can budget against it.
Batching is always cheaper than looping. Twenty addresses through prices.batch cost 300 credits; the same twenty as single calls cost 1,000. That is a rule this price list keeps, not a coincidence, so reach for the batch endpoint whenever there is one.
| Operation | Path | Base | Per item | Most it can cost |
|---|---|---|---|---|
etn.price | /prices/etn | 25 | — | 25 |
token.price | /prices/{chainId}/{address} | 50 | — | 50 |
prices.batch | /prices/{chainId} | 100 | 10 | 600 |
token.get | /tokens/{chainId}/{address} | 100 | — | 100 |
token.list | /tokens/{chainId} | 100 | 5 | 600 |
token.candles | /tokens/{chainId}/{address}/candles | 100 | 1 | 600 |
token.history | /tokens/{chainId}/{address}/history | 200 | — | 200 |
pool.list | /pools/{chainId} | 200 | 5 | 700 |
trade.list | /trades/{chainId} | 250 | 10 | 1,250 |
nft.stats | /nft/stats | 25 | — | 25 |
nft.collections | /nft/collections/{chainId} | 300 | 10 | 800 |
nft.collection | /nft/collections/{chainId}/{address} | 500 | — | 500 |
nft.assets | /nft/collections/{chainId}/{address}/assets | 400 | 20 | 1,400 |
presale.list | /presales/{chainId} | 250 | 10 | 750 |
presale.get | /presales/{chainId}/{pool} | 200 | — | 200 |
balances.get | /balances/{chainId}/{address} | 800 | 10 | 2,800 |
locks.get | /tokens/{chainId}/{address}/liquidity-locks | 2,000 | — | 2,000 |
farm.list | /farms/{chainId} | 3,000 | — | 3,000 |
account.me | /me | — | — | — |
meta.openapi | /openapi.json | — | — | — |
A limit above the maximum is rejected with 400 invalid_limit and costs nothing. So does a malformed request, and so does any 5xx of ours — we do not charge for our own failures.
ETN price
The chain's own asset. Everything else is priced against it.
GET /prices/etn
The ETN/USD spot price.
25 credits.
curl -s "https://electroswap.io/public-api/v1/prices/etn" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"
Tokens
One token or the whole listed set, with prices, supply, candles and history.
GET /prices/{chainId}/{address}
One token's last price in USD and ETN.
50 credits.
| Parameter | In | Required | Description |
|---|---|---|---|
chainId | path | yes | Electroneum mainnet. The API is mainnet-only; 52014 is the only accepted value. |
address | path | yes | The token or account address. |
curl -s "https://electroswap.io/public-api/v1/prices/52014/0xYOUR_ADDRESS" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"
GET /tokens/{chainId}/{address}
One token with its price and supply.
100 credits.
| Parameter | In | Required | Description |
|---|---|---|---|
chainId | path | yes | Electroneum mainnet. The API is mainnet-only; 52014 is the only accepted value. |
address | path | yes | The token or account address. |
curl -s "https://electroswap.io/public-api/v1/tokens/52014/0xYOUR_ADDRESS" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"
GET /tokens/{chainId}
Listed tokens, newest first.
100 credits, plus 5 per item returned — at most 600 for a full page of 100.
| Parameter | In | Required | Description |
|---|---|---|---|
chainId | path | yes | Electroneum mainnet. The API is mainnet-only; 52014 is the only accepted value. |
limit | query | no | Up to 100. A larger value is rejected with 400 INVALID_LIMIT and costs nothing. |
cursor | query | no | The cursor from a previous response. |
curl -s "https://electroswap.io/public-api/v1/tokens/52014" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"
GET /tokens/{chainId}/{address}/candles
OHLCV candles at a bucket size.
100 credits, plus 1 per item returned — at most 600 for a full page of 500.
| Parameter | In | Required | Description |
|---|---|---|---|
chainId | path | yes | Electroneum mainnet. The API is mainnet-only; 52014 is the only accepted value. |
address | path | yes | The token or account address. |
limit | query | no | Up to 500. A larger value is rejected with 400 INVALID_LIMIT and costs nothing. |
cursor | query | no | The cursor from a previous response. |
curl -s "https://electroswap.io/public-api/v1/tokens/52014/0xYOUR_ADDRESS/candles" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"
GET /tokens/{chainId}/{address}/history
Price history and period volume, high and low.
200 credits.
| Parameter | In | Required | Description |
|---|---|---|---|
chainId | path | yes | Electroneum mainnet. The API is mainnet-only; 52014 is the only accepted value. |
address | path | yes | The token or account address. |
curl -s "https://electroswap.io/public-api/v1/tokens/52014/0xYOUR_ADDRESS/history" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"
Batch prices
Up to fifty tokens in one call, for a fraction of what fifty calls cost.
GET /prices/{chainId}
Last prices for up to fifty tokens in one call.
100 credits, plus 10 per item returned — at most 600 for a full page of 50.
| Parameter | In | Required | Description |
|---|---|---|---|
chainId | path | yes | Electroneum mainnet. The API is mainnet-only; 52014 is the only accepted value. |
limit | query | no | Up to 50. A larger value is rejected with 400 INVALID_LIMIT and costs nothing. |
cursor | query | no | The cursor from a previous response. |
curl -s "https://electroswap.io/public-api/v1/prices/52014" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"
Pools
V2 and V3 liquidity in one list.
GET /pools/{chainId}
Pools with their reserves and value.
200 credits, plus 5 per item returned — at most 700 for a full page of 100.
| Parameter | In | Required | Description |
|---|---|---|---|
chainId | path | yes | Electroneum mainnet. The API is mainnet-only; 52014 is the only accepted value. |
limit | query | no | Up to 100. A larger value is rejected with 400 INVALID_LIMIT and costs nothing. |
cursor | query | no | The cursor from a previous response. |
curl -s "https://electroswap.io/public-api/v1/pools/52014" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"
Trades
Recent swaps, newest first.
GET /trades/{chainId}
Recent trades, newest first.
250 credits, plus 10 per item returned — at most 1,250 for a full page of 100.
| Parameter | In | Required | Description |
|---|---|---|---|
chainId | path | yes | Electroneum mainnet. The API is mainnet-only; 52014 is the only accepted value. |
limit | query | no | Up to 100. A larger value is rejected with 400 INVALID_LIMIT and costs nothing. |
cursor | query | no | The cursor from a previous response. |
curl -s "https://electroswap.io/public-api/v1/trades/52014" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"
NFTs
Marketplace totals, collections, and the assets inside them.
GET /nft/stats
Marketplace totals.
25 credits.
curl -s "https://electroswap.io/public-api/v1/nft/stats" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"
GET /nft/collections/{chainId}
Collections with floor, owners and volume.
300 credits, plus 10 per item returned — at most 800 for a full page of 50.
| Parameter | In | Required | Description |
|---|---|---|---|
chainId | path | yes | Electroneum mainnet. The API is mainnet-only; 52014 is the only accepted value. |
limit | query | no | Up to 50. A larger value is rejected with 400 INVALID_LIMIT and costs nothing. |
cursor | query | no | The cursor from a previous response. |
curl -s "https://electroswap.io/public-api/v1/nft/collections/52014" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"
GET /nft/collections/{chainId}/{address}
One collection with its statistics.
500 credits.
| Parameter | In | Required | Description |
|---|---|---|---|
chainId | path | yes | Electroneum mainnet. The API is mainnet-only; 52014 is the only accepted value. |
address | path | yes | The token or account address. |
curl -s "https://electroswap.io/public-api/v1/nft/collections/52014/0xYOUR_ADDRESS" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"
GET /nft/collections/{chainId}/{address}/assets
Assets in a collection.
400 credits, plus 20 per item returned — at most 1,400 for a full page of 50.
| Parameter | In | Required | Description |
|---|---|---|---|
chainId | path | yes | Electroneum mainnet. The API is mainnet-only; 52014 is the only accepted value. |
address | path | yes | The token or account address. |
limit | query | no | Up to 50. A larger value is rejected with 400 INVALID_LIMIT and costs nothing. |
cursor | query | no | The cursor from a previous response. |
curl -s "https://electroswap.io/public-api/v1/nft/collections/52014/0xYOUR_ADDRESS/assets" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"
Presales
Launchpad campaigns and their figures.
GET /presales/{chainId}
Launchpad presales.
250 credits, plus 10 per item returned — at most 750 for a full page of 50.
| Parameter | In | Required | Description |
|---|---|---|---|
chainId | path | yes | Electroneum mainnet. The API is mainnet-only; 52014 is the only accepted value. |
limit | query | no | Up to 50. A larger value is rejected with 400 INVALID_LIMIT and costs nothing. |
cursor | query | no | The cursor from a previous response. |
curl -s "https://electroswap.io/public-api/v1/presales/52014" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"
GET /presales/{chainId}/{pool}
One presale with its campaign figures.
200 credits.
| Parameter | In | Required | Description |
|---|---|---|---|
chainId | path | yes | Electroneum mainnet. The API is mainnet-only; 52014 is the only accepted value. |
pool | path | yes | The presale pool address. |
curl -s "https://electroswap.io/public-api/v1/presales/52014/0xYOUR_POOL" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"
Balances
What an address holds, as last recorded.
GET /balances/{chainId}/{address}
A stored balance document. No refresh, no per-token pricing.
800 credits, plus 10 per item returned — at most 2,800 for a full page of 200.
| Parameter | In | Required | Description |
|---|---|---|---|
chainId | path | yes | Electroneum mainnet. The API is mainnet-only; 52014 is the only accepted value. |
address | path | yes | The token or account address. |
limit | query | no | Up to 200. A larger value is rejected with 400 INVALID_LIMIT and costs nothing. |
cursor | query | no | The cursor from a previous response. |
curl -s "https://electroswap.io/public-api/v1/balances/52014/0xYOUR_ADDRESS" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"
Liquidity locks
Locked liquidity for a token, and when it unlocks.
GET /tokens/{chainId}/{address}/liquidity-locks
Liquidity locks for a token.
2,000 credits.
| Parameter | In | Required | Description |
|---|---|---|---|
chainId | path | yes | Electroneum mainnet. The API is mainnet-only; 52014 is the only accepted value. |
address | path | yes | The token or account address. |
curl -s "https://electroswap.io/public-api/v1/tokens/52014/0xYOUR_ADDRESS/liquidity-locks" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"
Yield farms
The active farms and what they pay.
GET /farms/{chainId}
Active yield farms. No farmer filter — per-account queries are not in v1.
3,000 credits.
| Parameter | In | Required | Description |
|---|---|---|---|
chainId | path | yes | Electroneum mainnet. The API is mainnet-only; 52014 is the only accepted value. |
curl -s "https://electroswap.io/public-api/v1/farms/52014" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"
Your account
Your own balance, tier and limits.
GET /me
Your balance, tier and limits.
Free — this call is not metered.
curl -s "https://electroswap.io/public-api/v1/me" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"
The OpenAPI document
A machine-readable description of everything above. No key needed.
GET /openapi.json
This document.
Free — this call is not metered.
curl -s "https://electroswap.io/public-api/v1/openapi.json"