BTCMarkets / API

API
120 stars 30 forks source link

What is the meaning of negative and positive Trade Fee? How to differenciate them from API response. #203

Open kpvipin opened 2 years ago

kpvipin commented 2 years ago

I am using the https://api.btcmarkets.net/v3/accounts/me/transactions API to fetch the Trading Fees. The Trading Fees returned by this API are always positive. The Transaction Report CSV file downloaded from BTCMarkets Portal in fact has both positive and negative Trade Fees.

Sample Response: Entry in the CSV File: 5537428034 2020-03-12T21:04:56Z Trade Trading Fee BTC 0.00001049 Sell 2.04616234BSV @ BTC 0.01025608 Trading fee 0.15505362 5537427883

Corresponding entry from Transactions API: (object) array( 'id' => '5537428034', 'creationTime' => '2020-03-12T21:04:56.533000Z', 'description' => 'Sell 2.04616234BSV @ BTC 0.01025608 Trading fee', 'assetName' => 'BTC', 'amount' => '0.00001049', 'balance' => '0.15505362', 'type' => 'Trading Fee', 'recordType' => 'Trade', 'referenceId' => '5537427883', ),

Entry in the CSV File: 5537427909 2020-03-12T21:04:55Z Trade Trading Fee BTC -0.00019999 Sell 9.7502BSV @ BTC 0.0102561 Trading fee 0.13405753 5537427883

Corresponding entry from Transactions API: (object) array( 'id' => '5537427909', 'creationTime' => '2020-03-12T21:04:55.519000Z', 'description' => 'Sell 9.7502BSV @ BTC 0.0102561 Trading fee', 'assetName' => 'BTC', 'amount' => '0.00019999', 'balance' => '0.13405753', 'type' => 'Trading Fee', 'recordType' => 'Trade', 'referenceId' => '5537427883', ),

Note that here the CSV file had the fee as negative, but the API returned a positive value.

meral-ngin commented 2 years ago

Hi @kpvipin,

I work in the BTC Markets API Trading Team.

When crypto-to-crypto trades are executed, the fees are are fixed at -0.05% for the maker, and 0.2% for the taker side. The maker fee amount is a positive flow into the customers BTC wallet, whereas the taker fees amount is a negative flow.

The API has been designed to only return positive values, and we do not intend on changing this functionality. Please consider using the transaction report to get an accurate representation of the transaction direction.

https://docs.btcmarkets.net/#tag/Report-APIs

Regards API Trading Team.