Skip to main content

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 and answers for chain 52014 only. Every metered call also carries X-Credits-Cost and X-Credits-Remainingaccount.me and openapi.json are free and carry neither, and nor does an error.

v1 pages with limit alone. No route accepts a cursor, and the cursor in a list response is null on every route but trade.list, where it is informational.

In the curl examples, 0xYOUR_ADDRESS and 0xYOUR_POOL are placeholders. Pasted literally they answer 400 invalid_request, because the address pattern is checked before anything else — substitute a real address first.

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.

OperationPathBasePer itemMost it can cost
etn.price/prices/etn2525
token.price/prices/{chainId}/{address}5050
prices.batch/prices/{chainId}10010600
token.get/tokens/{chainId}/{address}100100
token.list/tokens/{chainId}1005600
token.candles/tokens/{chainId}/{address}/candles1001600
token.history/tokens/{chainId}/{address}/history200200
pool.list/pools/{chainId}2005700
trade.list/trades/{chainId}25010500
nft.stats/nft/stats2525
nft.collections/nft/collections/{chainId}30010800
nft.collection/nft/collections/{chainId}/{address}500500
nft.assets/nft/collections/{chainId}/{address}/assets400201,400
presale.list/presales/{chainId}25010750
presale.get/presales/{chainId}/{pool}200200
balances.get/balances/{chainId}/{address}800102,800
locks.get/tokens/{chainId}/{address}/liquidity-locks2,0002,000
farm.list/farms/{chainId}3,0003,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.

† A heavy route. Its concurrency is two in flight across all keys, not per key, so it can answer 503 server_busy with Retry-After because somebody else is mid-call. Nothing is charged when it does.

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.

ParameterInRequiredDescription
chainIdpathyesElectroneum mainnet. The API is mainnet-only; 52014 is the only accepted value.
addresspathyesThe 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.

ParameterInRequiredDescription
chainIdpathyesElectroneum mainnet. The API is mainnet-only; 52014 is the only accepted value.
addresspathyesThe 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}

Every listed token on the chain, in no particular order.

100 credits, plus 5 per item returned — at most 600 for a full page of 100.

ParameterInRequiredDescription
chainIdpathyesElectroneum mainnet. The API is mainnet-only; 52014 is the only accepted value.
limitquerynoUp to 100. A larger value is rejected with 400 invalid_limit and costs nothing.
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.

ParameterInRequiredDescription
chainIdpathyesElectroneum mainnet. The API is mainnet-only; 52014 is the only accepted value.
addresspathyesThe token or account address.
limitquerynoUp to 500. A larger value is rejected with 400 invalid_limit and costs nothing.
bucketquerynoCandle size: 1m, 15m, 1h (the default), 4h or 1d. Anything else answers 400 invalid_request.
currencyquerynoThe quote currency: USD (the default) or ETN.
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.

ParameterInRequiredDescription
chainIdpathyesElectroneum mainnet. The API is mainnet-only; 52014 is the only accepted value.
addresspathyesThe token or account address.
durationquerynoThe window looking back from now: HOUR, DAY (the default), WEEK, MONTH or YEAR. Case-insensitive; anything else answers 400 invalid_request.
currencyquerynoThe quote currency: USD (the default) or ETN.
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.

ParameterInRequiredDescription
chainIdpathyesElectroneum mainnet. The API is mainnet-only; 52014 is the only accepted value.
addressesqueryyesRequired. One to fifty token addresses, comma-separated. Omitting it answers 400 invalid_request; more than fifty answers 400 invalid_request too. You are charged per address in the list.
curl -s "https://electroswap.io/public-api/v1/prices/52014?addresses=0x138DAFbDA0CCB3d8E39C19edb0510Fc31b7C1c77,0xEe432C220273e4F949007B4c1946562826Efa055" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"

Pools

V2 or V3 liquidity — one version per call, v2 by default.

GET /pools/{chainId}

V2 or V3 pools and the pair each one holds.

200 credits, plus 5 per item returned — at most 700 for a full page of 100.

ParameterInRequiredDescription
chainIdpathyesElectroneum mainnet. The API is mainnet-only; 52014 is the only accepted value.
limitquerynoUp to 100. A larger value is rejected with 400 invalid_limit and costs nothing.
versionquerynoWhich pools to list: 2 (the default) or 3. One version per call — there is no combined list.
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 500 for a full page of 25.

ParameterInRequiredDescription
chainIdpathyesElectroneum mainnet. The API is mainnet-only; 52014 is the only accepted value.
limitquerynoUp to 25. A larger value is rejected with 400 invalid_limit and costs nothing.
tokenquerynoOnly trades in this token.
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. Floor, owners and volume come from the single-collection route.

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}

Listed collections and their identity. Floor, owners and volume come from nft.collection.

300 credits, plus 10 per item returned — at most 800 for a full page of 50.

ParameterInRequiredDescription
chainIdpathyesElectroneum mainnet. The API is mainnet-only; 52014 is the only accepted value.
limitquerynoUp to 50. A larger value is rejected with 400 invalid_limit and costs nothing.
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.

ParameterInRequiredDescription
chainIdpathyesElectroneum mainnet. The API is mainnet-only; 52014 is the only accepted value.
addresspathyesThe 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.

ParameterInRequiredDescription
chainIdpathyesElectroneum mainnet. The API is mainnet-only; 52014 is the only accepted value.
addresspathyesThe token or account address.
limitquerynoUp to 50. A larger value is rejected with 400 invalid_limit and costs nothing.
curl -s "https://electroswap.io/public-api/v1/nft/collections/52014/0xYOUR_ADDRESS/assets" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"

Presales

Launchpad campaigns: the pool, its token and its status.

GET /presales/{chainId}

Launchpad presales.

250 credits, plus 10 per item returned — at most 750 for a full page of 50.

ParameterInRequiredDescription
chainIdpathyesElectroneum mainnet. The API is mainnet-only; 52014 is the only accepted value.
limitquerynoUp to 50. A larger value is rejected with 400 invalid_limit and costs nothing.
curl -s "https://electroswap.io/public-api/v1/presales/52014" \
-H "Authorization: Bearer $ELECTROSWAP_API_KEY"

GET /presales/{chainId}/{pool}

One presale: its pool, token and status.

200 credits.

ParameterInRequiredDescription
chainIdpathyesElectroneum mainnet. The API is mainnet-only; 52014 is the only accepted value.
poolpathyesThe 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.

ParameterInRequiredDescription
chainIdpathyesElectroneum mainnet. The API is mainnet-only; 52014 is the only accepted value.
addresspathyesThe token or account address.
limitquerynoUp to 200. A larger value is rejected with 400 invalid_limit and costs nothing.
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.

ParameterInRequiredDescription
chainIdpathyesElectroneum mainnet. The API is mainnet-only; 52014 is the only accepted value.
addresspathyesThe 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.

ParameterInRequiredDescription
chainIdpathyesElectroneum 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 credit balance and tier.

GET /me

Your credit balance and tier.

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"