Skip to main content

Get User Transactions

Retrieve all trade transactions.

warning

For all transactions related to the private endpoint, you must authorize before sending your request.

For more information you can check our Authentication V1 article.

  • 6 parameters can be used to access user transactions.
  • You can access user transactions with orderId, type, symbol, pairSymbol,startDate and endDate parameters.
  • If the startDate and endDate parameters are not used, the last 30 days of transactions are displayed.
info

The startDate and endDate parameters must be used with Unix timestamps in milliseconds.

Trade

GET https://api.btcturk.com/api/v1/users/transactions/trade

Query Parameters

NameTypeDescription
orderIdintegerlong, Optional you can not combine this parameter with other parameters. So you should send this parameter alone.
typearraystring array, {"buy", "sell"}
symbolarraystring array, {"btc", "try", ...etc.}
startDateintegerlong, Optional timestamp if null will return last 30 days
endDateintegerlong, Optional timestamp if null will return last 30 days
pairSymbolstringBTCTRY, ETHTRY etc.

Headers

NameTypeDescription
X-PCK*stringAPI public key. You can create the API key from the Account > API Access page in your exchange account.
X-Stamp*integerNonce must be current timestamp in miliseconds. It is a must to sync your current time with API server time which is in miliseconds format. Our servers are using UTC timezone.
X-Signature*stringSignature is a HMAC-SHA256 encoded message. The HMAC-SHA256 code must be generated using a private key that contains a timestamp as nonce and your API key.
{
"success": true,
"message": "SUCCESS",
"code": 0,
"data": [
{
"id": 1181163798924649598,
"timestamp": 1663848223334,
"amount": "-0.3384",
"preciseAmount": -0.3384081100000000,
"fee": "-0.06297817",
"tax": "-0.01133607",
"price": "122.00",
"numeratorSymbol": "ETHW",
"denominatorSymbol": "TRY",
"orderType": "sell",
"orderId": 10938696222,
"orderClientId": null
},
{
"id": 1020163798374837834,
"timestamp": 1663622424245,
"amount": "-0.01560000",
"preciseAmount": -0.0156,
"fee": "-0.00908237",
"tax": "-0.00163483",
"price": "1374.0",
"numeratorSymbol": "ETH",
"denominatorSymbol": "USDT",
"orderType": "sell",
"orderId": 10897282010,
"orderClientId": "ask"
},
{
"id": 1020163798374837164,
"timestamp": 1663604612625,
"amount": "-0.01000000",
"preciseAmount": -0.01,
"fee": "-0.01025161",
"tax": "-0.00184529",
"price": "1344.1",
"numeratorSymbol": "ETH",
"denominatorSymbol": "USDT",
"orderType": "sell",
"orderId": 10894536211,
"orderClientId": "advanced"
}
]
}

Trade Transaction Code Example

// You can download ApiClient .net core complete library from github https://github.com/BTCTrader/broker-api-csharp-v2

var configuration = new ConfigurationBuilder().AddJsonFile("appsettings.json").Build();

var publicKey = configuration["publicKey"];
var privateKey = configuration["privateKey"];
var resourceUrl = configuration["resourceUrl"];
var apiClientV1 = new ApiClientV1(publicKey, privateKey, resourceUrl);

var startdate = new DateTime(2019, 11, 19);
var endatet = new DateTime(2019, 12, 19);
var userTrades = apiClientV1.GetUserTrades(new[] { "buy", "sell" }, new[] { "try", "btc" }, startdate.ToUnixTime(), endatet.ToUnixTime());

if (userTrades.Result.Success)
{
foreach (var userTrade in userTrades.Result.Data)
{
Console.WriteLine(userTrade);
}
}