TL;DR:
For CoinTracking to integrate a new exchange API, the exchange should provide read-only API access and endpoints for all trades, deposits, and withdrawals. Trade data must include coin amounts, fees, unique IDs, and timestamps. Deposit and withdrawal data must include coin, amount, fee, type, unique ID, and timestamp.
More info: Request process when exchange is not listed on CoinTracking / add new exchange
What is required for a new API integration?
For the best integration, CoinTracking needs one of the following main API methods.
1. Method to retrieve all trades
The API should provide a method to retrieve all trades for all pairs, including completed and partially canceled trades.
This method does not need to be extremely fast. A response time of up to 3 minutes is acceptable.
For each trade, the following data is required:
Buy coin
Buy amount
Sell coin
Sell amount
Fee coin
Fee amount
Unique ID
Time as Unix timestamp in seconds
Example of the preferred structure:
"id": 1234567,
"buy_coin": "BTC",
"buy_amount": "1.00234522",
"sell_coin": "LTC",
"sell_amount": "10.0202020",
"fee_coin": "BTC",
"fee_amount": "0.001",
"time": 153232292
What if this structure is not possible?
If the preferred structure cannot be provided, the following structure is also acceptable:
"id": 1234567,
"pair": "LTC_BTC",
"type": "sell",
"amount": "1.00234522",
"price": "10.0404470",
"fee_amount": "0.001",
"time": 153232292
In this case, the API must:
Show as amount what the user bought
Calculate price as buy amount before fees / sell amount before fees
Clearly state whether the amount field includes the fee or not
Use fees only in the coin the user bought or in the coin the user sold, so CoinTracking can determine which coin was used for the fee
2. Method to retrieve all deposits and withdrawals
The API should also provide a method to retrieve all deposits and withdrawals.
For deposit and withdrawal data, the following information is required:
Coin
Amount
Fee amount
Unique ID
Type: withdrawal or deposit
Time as Unix timestamp in seconds
If users can earn or spend coins in other ways on the exchange, the API should also provide methods that return these transactions.
3. Read-only API keys
CoinTracking requires read-only API keys.
These keys must not allow:
Trading
Withdrawals
Read-only keys are required so CoinTracking can store them securely and run imports without any further action from the user.
Summary
To integrate a new exchange API with CoinTracking, the exchange should provide complete read-only access to trades, deposits, withdrawals, and any other coin-related activity. Each transaction must include clear amounts, fees, unique IDs, and Unix timestamps. API keys must be read-only and must not allow trading or withdrawals.