Fetch CCXT private trades
curl --request GET \
--url https://testnet.edel-api.xyz/v2/accounts/{accountId}/fills \
--header 'Authorization: Bearer <token>'import requests
url = "https://testnet.edel-api.xyz/v2/accounts/{accountId}/fills"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://testnet.edel-api.xyz/v2/accounts/{accountId}/fills', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://testnet.edel-api.xyz/v2/accounts/{accountId}/fills",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://testnet.edel-api.xyz/v2/accounts/{accountId}/fills"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://testnet.edel-api.xyz/v2/accounts/{accountId}/fills")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.edel-api.xyz/v2/accounts/{accountId}/fills")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"order": "<string>",
"symbol": "<string>",
"timestamp": 1,
"datetime": "<string>",
"side": "buy",
"takerOrMaker": "maker",
"price": 123,
"amount": 1,
"fee": {
"cost": 1,
"currency": "<string>"
},
"info": {
"tradeId": "<string>",
"accountId": "<string>",
"marketId": "<string>",
"role": "maker",
"feePaidAtoms": "<string>",
"feePaid": "<string>",
"feeRole": "maker",
"side": "buy",
"priceAtoms": "<string>",
"price": "<string>",
"sizeAtoms": "<string>",
"size": "<string>",
"orderId": "<string>",
"counterpartyOrderId": "<string>",
"occurredAtEpochMs": 1,
"lastSequence": 1,
"realizedPnlAtoms": "<string>",
"realizedPnl": "<string>"
}
}
]{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}CCXT v2
Fetch CCXT private trades
Translates CCXT symbol, since, and limit over the existing cursor-paged account fill projection.
Method and path: GET /v2/accounts//fills
Authentication: DFNS trader bearer required.
Request schema: none.
Response schema: CcxtV2TradesResponse.
Error envelope: CcxtV2ErrorResponse (contains ExternalRestError external-rest-error/v1 as info).
GET
/
v2
/
accounts
/
{accountId}
/
fills
Fetch CCXT private trades
curl --request GET \
--url https://testnet.edel-api.xyz/v2/accounts/{accountId}/fills \
--header 'Authorization: Bearer <token>'import requests
url = "https://testnet.edel-api.xyz/v2/accounts/{accountId}/fills"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://testnet.edel-api.xyz/v2/accounts/{accountId}/fills', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://testnet.edel-api.xyz/v2/accounts/{accountId}/fills",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://testnet.edel-api.xyz/v2/accounts/{accountId}/fills"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://testnet.edel-api.xyz/v2/accounts/{accountId}/fills")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.edel-api.xyz/v2/accounts/{accountId}/fills")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"order": "<string>",
"symbol": "<string>",
"timestamp": 1,
"datetime": "<string>",
"side": "buy",
"takerOrMaker": "maker",
"price": 123,
"amount": 1,
"fee": {
"cost": 1,
"currency": "<string>"
},
"info": {
"tradeId": "<string>",
"accountId": "<string>",
"marketId": "<string>",
"role": "maker",
"feePaidAtoms": "<string>",
"feePaid": "<string>",
"feeRole": "maker",
"side": "buy",
"priceAtoms": "<string>",
"price": "<string>",
"sizeAtoms": "<string>",
"size": "<string>",
"orderId": "<string>",
"counterpartyOrderId": "<string>",
"occurredAtEpochMs": 1,
"lastSequence": 1,
"realizedPnlAtoms": "<string>",
"realizedPnl": "<string>"
}
}
]{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}{
"name": "AccountNotEnabled",
"message": "<string>",
"code": "invalid_request",
"retryable": true,
"timestamp": 1,
"datetime": "<string>",
"info": {
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Minimum string length:
1Query Parameters
Optional CCXT perpetual symbol.
Minimum string length:
1Optional inclusive Unix timestamp in integer milliseconds.
Required range:
x >= 0Maximum trades, from 1 to 100. Defaults to 50.
Required range:
x <= 100Response
Success
Minimum string length:
1Minimum string length:
1Minimum string length:
1Required range:
x >= 0Available options:
buy, sell Available options:
maker, taker Required range:
x >= 0Show child attributes
Show child attributes
Show child attributes
Show child attributes