REST API
production environment: https://sapi.monochrome.exchangeBasic information of the interface
Due to reasons such as high latency and poor stability, it is not recommended to access the API through a proxy. GET request parameters are placed in query Params, POST request parameters are placed in request body Please set the request header information to:Content-Type=application/json For requests that start other than /public, the request message needs to be signedFrequency Limiting Rules
Some interfaces will have limited flow control (the corresponding interface will have a limited flow description). The flow limit is mainly divided into gateway flow limit and WAF flow limit. If the interface request triggers the gateway flow limit, 429 will be returned, indicating that the access frequency exceeds the limit, and the IP or apiKey will be blocked. Gateway flow limiting is divided into IP and apiKey flow limiting. Example description of IP flow limit: 100/s/ip, indicating the limit of the number of requests per second for this interface per IP. apiKey current limit example description: 50/s/apiKey, indicating the limit of the number of requests per second for the interface per apiKey.Signature Instructions
Since Monochrome needs to provide some open interfaces for third-party platforms,therefore, the issue of data security needs to be considered. Such as whether the data has been tampered with, whether the data is outdated, whether the data can be submitted repeatedly, and the access frequency of the interface, and whether data has been tampered with is the most important issue.- Please apply for appkey and secretkey in the user center first, each user’s appkey and secretkey are different.
- Add timestamp, its value should be the unix timestamp (milliseconds) of the time when the request is sent, and the time of the data is calculated based on this value.
- Add signature, its value is obtained by a certain rule of signature algorithm.
- Add recvwindow (defining the valid time of the request), the valid time is currently relatively simple and uniformly fixed at a certain value.
Signature generation
Take https://sapi.monochrome.exchange/v4/order as an example. The following is an example appkey and secret for placing an order using a call interface implemented by echo openssl and curl tools in the linux bash environment for demonstration purposes only: appKey: 3976eb88-76d0-4f6e-a6b2-a57980770085 secretKey: bc6630d0231fda5cd98794f52c4998659beda290 Header part data:API code library
Java connector A lightweight Java codebase that provides methods that allow users to directly call the API。 Sdks for each language:response format
All interface returns are in JSON format.Response

