API Reference
Public read-only HTTP and WebSocket API of Alcor Exchange.
The Alcor API serves market data for the spot order book DEX and the AMM: tokens, prices, tickers, order books, trades, candles, pools, positions and account history, over HTTP and WebSocket. It is read-only and needs no key. Placing orders and swapping are blockchain transactions, signed by the user and sent to a node (see Trade API and Swap route).
Chains and base URLs
Each chain has its own host. The chain of a request is taken from the host name.
| Chain | Base URL |
|---|---|
| WAX | https://wax.alcor.exchange/api/ |
| EOS | https://eos.alcor.exchange/api/ |
| Telos | https://telos.alcor.exchange/api/ |
| XPR Network | https://proton.alcor.exchange/api/ |
All examples use WAX; change the host for another chain. https://alcor.exchange/api/... redirects to WAX, so call
the chain's host directly. An unknown chain name answers HTTP 404.
Conventions
- Token id:
<symbol>-<contract>in lower case, e.g.tlm-alien.worlds. Any contract can issue any symbol, so the contract is part of the id. - Ticker id: two token ids, base first,
<base>_<target>, e.g.tlm-alien.worlds_wax-eosio.token. - Time: units differ between endpoints (unix seconds, unix milliseconds or ISO 8601 strings). Each endpoint states its own.
- Errors: most v2 endpoints answer errors as plain text with an HTTP status; v3 endpoints answer
{"error": "<message>"}. - Rate limits: requests are rate-limited per IP address. Over the limit, the API answers HTTP 429.
Sections
Tokens
Token prices, scores and logos.
Market Data
Spot tickers, order books, trades and candles; the AMM ticker feed.
Swap
AMM pools, positions, swaps, candles and swap routes.
Market API
Per-block prices, depth, pools and order books for bots, with a WebSocket stream.
Global Data
Exchange-wide TVL, volume and fees.
Analytics (v3)
Paged token, pool and spot market lists with TVL, volume and scores.
Account
An account's trades, positions and swap history.
WebSocket
Live trades, order books, candles and account events over Socket.IO.
On-chain Data
Reading markets and orders from the DEX contract tables.
Trade API
Placing and cancelling spot orders with contract actions.
CPU Payer
Free CPU for transactions with Alcor contracts on WAX.
Bridge
Deposit link, widget, status API and contracts of the Alcor bridge.
Contracts
Writing to Alcor means calling its contracts through any node API, with a library such as Wharf or eosjs.
| Chain | Spot DEX | AMM |
|---|---|---|
| WAX | alcordexmain | swap.alcor |
| EOS | eostokensdex | swap.alcor |
| Telos | eostokensdex | swap.alcor |
| XPR Network | alcor | swap.alcor |
Contract actions and tables are described in Developers.