Introduction
We provide two interfaces to communicate between Orderly Network and clients.
RESTful API interface: Provides sending events like create order, cancel order, fetch balance, etc.
Websocket interface: Provides real-time orderbook data feed and order update feed.
Base endpoints
https://api-evm.orderly.org/
(Mainnet)
https://testnet-api-evm.orderly.org
(Testnet)
General Information on REST Endpoints
For GET
and DELETE
endpoints, parameters must be sent as a query string
.
For POST
and PUT
endpoints, the parameters must be sent in the request body
with content type application/json
.
Parameters may be sent in any order.
Authorization
All our private interfaces require signing via cryptographically secure keys for authentication, also known as Orderly key.
Please set the corresponding header in your request. Please refer to API authentication for more information.
Symbol
Orderly Network uses the format of PERP_<SYMBOL>_USDC
to represent a symbol name, for example: PERP_ETH_USDC
.
Rate Limit
Rate limit is counted using the Orderly key. If your application reached the rate limit of certain endpoint, the server will return an error result with http code 429
. You may need wait until next time horizon.
Error Message
Errors consist of three parts: an error code, detailed message and a success flag.
{
"success": false,
"code": -1005, // Error code
"message": "order_price must be a positive number" // Detail message
}
All API will return following json when api fails, the “message” will contain the detail error message, it may be because some data are in wrong format, or other reasons.
Specific error codes and messages are defined in Error Codes.