REST API
Official: USDT-M:https://fapi.monochrome.exchange Coin-M:https://dapi.monochrome.exchangeBasic Information of the Interface
Due to the reasons of high latency and poor stability, it is not recommend to access the Monochrome API through a proxy. GET request parameters are put in query Params, POST request parameters are put in request body. The request header information is set to: Content-Type=application/x-www-form-urlencoded In addition to the parameters required by the interface itself, signature, which is the signature parameter, needs to be passed in the query Params or request body. The interface that does not need to pass the signature parameter will be additionally explained.Frequency Limiting Rules
Get assets 3 times per second, other methods 10 times per second for each single user, 1000 times per minute for each single IP, exceeding the requested times, account will be locked for 10 minutes.Signature Statement
Since Monochrome needs to provide some open interfaces for third-party platforms, it requires data security issues of the interface, such as whether the data has been tampered with, whether the data is outdated, whether the data can be submitted repeatedly, and the frequency of access to the interface within a certain period of time. Among them, whether the data has been tampered with is most important.- Offline distribution of appkey and secretkey, for different calls, provide different appkey and secretkey.
- Add timestamp, the value of which should be the unix timestamp (milliseconds) of the time when the request is sent, and the valid time of the data is calculated according to this value.
- Add signature information for all data.
- Add recvwindow, the valid time is relatively simple and fixed to a certain value. For example, the data is valid within 10 minutes under the same api and appid. Here, it can be further optimized to the valid time of a single api is different.
Obtain Signature
Example for http://fapi.monochrome.exchange/api/v1/public/symbol/detail?symbol=btc_usdt The following is an example of an order placed in a call interface using echo openssl and curl tools in a Linux bash environment. Appkey, secret for demonstration purposes only: appKey: 3976eb88-76d0-4f6e-a6b2-a57980770085 secretKey: bc6630d0231fda5cd98794f52c4998659beda290 Partial data of Header: validate-appkey: 3976eb88-76d0-4f6e-a6b2-a57980770085 validate-timestamp: 1641446237201 validate-algorithms: HmacSHA256 Request data: { type: ‘LIMIT’, timeInForce: ‘GTC’, side: ‘BUY’, symbol: ‘btc_usdt’, price: ‘39000’, quantity: ‘2’ } 1、Data path: Concatenate all values in the order in path. The restful path in the form of /test/{var1}/{var2}/ will be spliced according to the actual parameters filled in, for example: /sign/test/bb/aa query: Sorted by lexicographic order of key, concatenate all key=value. Example: userName=dfdfdf&password=ggg body: Json: Operate as JSON string is not converted or sorted.API Library
Java connector A lightweight Java code library that provides a method for users to directly call the API Sdks for each language:Return Format
All interfaces’ returns are in JSON format.Response

