NAV
Shell HTTP JavaScript Ruby Python PHP Java Go

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Introduction

Welcome to Blockchain.com's Exchange API and developer documentation. These documents detail and give examples of various functionality offered by the API such as receiving real time market data, requesting balance information and performing trades.

To get started

  1. Create or log into your existing Blockchain.com Exchange account
  2. Select API from the drop down menu
  3. Fill out form and click “Create New API Key Now”

Once generated you can view your keys under API Settings. Please be aware that the API key can only be used once it was verified via email.

The API key must be set via the X-API-Token header.

The base URL to be used for all calls is https://api.blockchain.com/v3/exchange

Autogenerated clients for this API can be found here.

Base URLs:

Authentication

Market data

Retrieve current prices and markets

getL2OrderBook

Code samples

# You can also use wget
curl -X GET https://api.blockchain.com/v3/exchange/l2/{symbol} \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

GET https://api.blockchain.com/v3/exchange/l2/{symbol} HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/l2/{symbol}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.get 'https://api.blockchain.com/v3/exchange/l2/{symbol}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.get('https://api.blockchain.com/v3/exchange/l2/{symbol}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.blockchain.com/v3/exchange/l2/{symbol}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/l2/{symbol}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.blockchain.com/v3/exchange/l2/{symbol}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /l2/{symbol}

L2 Order Book

Level 2 Order Book data is available through the l2 channel. Each entry in bids and asks arrays is a price level, along with its price (px), quantity (qty) and number of orders (num) attributes.

Parameters

Name In Type Required Description
symbol path symbol true Symbol

Example responses

200 Response

{
  "symbol": "BTC-USD",
  "bids": [
    {
      "px": "8723.45",
      "qty": "1.45",
      "num": "1"
    }
  ],
  "asks": [
    {
      "px": "8723.45",
      "qty": "1.45",
      "num": "1"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Success OrderBook

getL3OrderBook

Code samples

# You can also use wget
curl -X GET https://api.blockchain.com/v3/exchange/l3/{symbol} \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

GET https://api.blockchain.com/v3/exchange/l3/{symbol} HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/l3/{symbol}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.get 'https://api.blockchain.com/v3/exchange/l3/{symbol}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.get('https://api.blockchain.com/v3/exchange/l3/{symbol}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.blockchain.com/v3/exchange/l3/{symbol}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/l3/{symbol}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.blockchain.com/v3/exchange/l3/{symbol}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /l3/{symbol}

L3 Order Book

Level 3 Order Book data is available through the l3 channel. Each entry in bids and asks arrays is an order, along with its id (id), price (px) and quantity (qty) attributes. In contrast to the L2 order book, the L3 order book contains all individual orders without aggregation.

Parameters

Name In Type Required Description
symbol path symbol true Symbol

Example responses

200 Response

{
  "symbol": "BTC-USD",
  "bids": [
    {
      "px": "8723.45",
      "qty": "1.45",
      "num": "1"
    }
  ],
  "asks": [
    {
      "px": "8723.45",
      "qty": "1.45",
      "num": "1"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Success OrderBook

getTickers

Code samples

# You can also use wget
curl -X GET https://api.blockchain.com/v3/exchange/tickers \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

GET https://api.blockchain.com/v3/exchange/tickers HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/tickers',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.get 'https://api.blockchain.com/v3/exchange/tickers',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.get('https://api.blockchain.com/v3/exchange/tickers', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.blockchain.com/v3/exchange/tickers', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/tickers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.blockchain.com/v3/exchange/tickers", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /tickers

Price

Example responses

200 Response

[
  {
    "symbol": "BTC-USD",
    "price_24h": "4998.0",
    "volume_24h": "0.3015",
    "last_trade_price": "5000.0"
  }
]

Responses

Status Meaning Description Schema
200 OK Success Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [PriceEvent] false none none
» symbol symbol false none Blockchain symbol identifier
» price_24h number(double) false none none
» volume_24h number(double) false none none
» last_trade_price number(double) false none none

getTickerBySymbol

Code samples

# You can also use wget
curl -X GET https://api.blockchain.com/v3/exchange/tickers/{symbol} \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

GET https://api.blockchain.com/v3/exchange/tickers/{symbol} HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/tickers/{symbol}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.get 'https://api.blockchain.com/v3/exchange/tickers/{symbol}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.get('https://api.blockchain.com/v3/exchange/tickers/{symbol}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.blockchain.com/v3/exchange/tickers/{symbol}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/tickers/{symbol}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.blockchain.com/v3/exchange/tickers/{symbol}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /tickers/{symbol}

Price

Parameters

Name In Type Required Description
symbol path symbol true Symbol

Example responses

200 Response

{
  "symbol": "BTC-USD",
  "price_24h": "4998.0",
  "volume_24h": "0.3015",
  "last_trade_price": "5000.0"
}

Responses

Status Meaning Description Schema
200 OK Success PriceEvent

getSymbols

Code samples

# You can also use wget
curl -X GET https://api.blockchain.com/v3/exchange/symbols \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

GET https://api.blockchain.com/v3/exchange/symbols HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/symbols',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.get 'https://api.blockchain.com/v3/exchange/symbols',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.get('https://api.blockchain.com/v3/exchange/symbols', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.blockchain.com/v3/exchange/symbols', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/symbols");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.blockchain.com/v3/exchange/symbols", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /symbols

Symbols

When the symbol is not halted the auction data in the message may be blank. When a symbol is in a halt state the auction data will populate as the book builds. When an opening time has been chosen, the auction-time field will show the opening time. Subsequent updates will be sent only if the symbol status changes in any way.

Example responses

200 Response

{
  "property1": {
    "base_currency": "BTC-USD",
    "base_currency_scale": 8,
    "counter_currency": "BTC-USD",
    "counter_currency_scale": 2,
    "min_price_increment": 10,
    "min_price_increment_scale": 0,
    "min_order_size": 10,
    "min_order_size_scale": 2,
    "max_order_size": 0,
    "max_order_size_scale": 8,
    "lot_size": 5,
    "lot_size_scale": 2,
    "status": "open",
    "id": 1,
    "auction_price": 0,
    "auction_size": 0,
    "auction_time": "1530",
    "imbalance": 0
  },
  "property2": {
    "base_currency": "BTC-USD",
    "base_currency_scale": 8,
    "counter_currency": "BTC-USD",
    "counter_currency_scale": 2,
    "min_price_increment": 10,
    "min_price_increment_scale": 0,
    "min_order_size": 10,
    "min_order_size_scale": 2,
    "max_order_size": 0,
    "max_order_size_scale": 8,
    "lot_size": 5,
    "lot_size_scale": 2,
    "status": "open",
    "id": 1,
    "auction_price": 0,
    "auction_size": 0,
    "auction_time": "1530",
    "imbalance": 0
  }
}

Responses

Status Meaning Description Schema
200 OK Success Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» additionalProperties SymbolStatus false none none
»» base_currency symbol false none Blockchain symbol identifier
»» base_currency_scale integer false none The number of decimals the currency can be split in
»» counter_currency symbol false none Blockchain symbol identifier
»» counter_currency_scale integer false none The number of decimals the currency can be split in
»» min_price_increment integer(int64) false none The price of the instrument must be a multiple of min_price_increment * (10^-min_price_increment_scale)
»» min_price_increment_scale integer false none none
»» min_order_size integer(int64) false none The minimum quantity for an order for this instrument must be min_order_size*(10^-min_order_size_scale)
»» min_order_size_scale integer false none none
»» max_order_size integer(int64) false none The maximum quantity for an order for this instrument is max_order_size*(10^-max_order_size_scale). If this equal to zero, there is no limit
»» max_order_size_scale integer false none none
»» lot_size integer(int64) false none none
»» lot_size_scale integer false none none
»» status string false none Symbol status; open, close, suspend, halt, halt-freeze.
»» id integer(int64) false none none
»» auction_price number(double) false none If the symbol is halted and will open on an auction, this will be the opening price.
»» auction_size number(double) false none Opening size
»» auction_time string false none Opening time in HHMM format
»» imbalance number(double) false none Auction imbalance. If > 0 then there will be buy orders left over at the auction price. If < 0 then there will be sell orders left over at the auction price.

Enumerated Values

Property Value
status open
status close
status suspend
status halt
status halt-freeze

getSymbolByName

Code samples

# You can also use wget
curl -X GET https://api.blockchain.com/v3/exchange/symbols/{symbol} \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

GET https://api.blockchain.com/v3/exchange/symbols/{symbol} HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/symbols/{symbol}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.get 'https://api.blockchain.com/v3/exchange/symbols/{symbol}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.get('https://api.blockchain.com/v3/exchange/symbols/{symbol}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.blockchain.com/v3/exchange/symbols/{symbol}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/symbols/{symbol}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.blockchain.com/v3/exchange/symbols/{symbol}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /symbols/{symbol}

Symbols

When the symbol is not halted the auction data in the message may be blank. When a symbol is in a halt state the auction data will populate as the book builds. When an opening time has been chosen, the auction-time field will show the opening time. Subsequent updates will be sent only if the symbol status changes in any way.

Parameters

Name In Type Required Description
symbol path symbol true Symbol

Example responses

200 Response

{
  "base_currency": "BTC-USD",
  "base_currency_scale": 8,
  "counter_currency": "BTC-USD",
  "counter_currency_scale": 2,
  "min_price_increment": 10,
  "min_price_increment_scale": 0,
  "min_order_size": 10,
  "min_order_size_scale": 2,
  "max_order_size": 0,
  "max_order_size_scale": 8,
  "lot_size": 5,
  "lot_size_scale": 2,
  "status": "open",
  "id": 1,
  "auction_price": 0,
  "auction_size": 0,
  "auction_time": "1530",
  "imbalance": 0
}

Responses

Status Meaning Description Schema
200 OK Success SymbolStatus

Trading

Post orders and get information about historical trades

getFees

Code samples

# You can also use wget
curl -X GET https://api.blockchain.com/v3/exchange/fees \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

GET https://api.blockchain.com/v3/exchange/fees HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/fees',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.get 'https://api.blockchain.com/v3/exchange/fees',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.get('https://api.blockchain.com/v3/exchange/fees', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.blockchain.com/v3/exchange/fees', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/fees");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.blockchain.com/v3/exchange/fees", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /fees

Get current fee level

Example responses

200 Response

{
  "makerRate": "0.0014",
  "takerRate": "0.0024",
  "volumeInUSD": "1500.00"
}

Responses

Status Meaning Description Schema
200 OK Success Fees

getOrdersInternal

Code samples

# You can also use wget
curl -X GET https://api.blockchain.com/v3/exchange/internal/orders \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

GET https://api.blockchain.com/v3/exchange/internal/orders HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/internal/orders',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.get 'https://api.blockchain.com/v3/exchange/internal/orders',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.get('https://api.blockchain.com/v3/exchange/internal/orders', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.blockchain.com/v3/exchange/internal/orders', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/internal/orders");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.blockchain.com/v3/exchange/internal/orders", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /internal/orders

Get a list of orders directly from the ME

Returns orders as pulled directly from the ME

Parameters

Name In Type Required Description
from query TimestampEpoch false Epoch timestamp in ms
orderId query integer(int64) false Last orderId seen in paginated responses.
limit query integer(int32) false Maximum amount of results to return in a single call. If omitted, 100 results are returned by default.

Example responses

200 Response

{
  "nextOrderId": "11111111",
  "orders": [
    {
      "exOrdId": "11111111",
      "clOrdId": "ABC",
      "ordType": "MARKET",
      "ordStatus": "FILLED",
      "side": "BUY",
      "price": 0.12345,
      "text": "string",
      "symbol": "BTC-USD",
      "lastShares": "0.5678",
      "lastPx": "3500.12",
      "leavesQty": "10.0",
      "cumQty": "0.123345",
      "avgPx": "345.33",
      "timestamp": "1592830770594"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Success PaginatedOrderSummary

getOrders

Code samples

# You can also use wget
curl -X GET https://api.blockchain.com/v3/exchange/orders \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

GET https://api.blockchain.com/v3/exchange/orders HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/orders',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.get 'https://api.blockchain.com/v3/exchange/orders',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.get('https://api.blockchain.com/v3/exchange/orders', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.blockchain.com/v3/exchange/orders', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/orders");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.blockchain.com/v3/exchange/orders", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /orders

Get a list orders

Returns live and historic orders, defaulting to live orders. Returns at most 100 results, use timestamp to paginate for further results

Parameters

Name In Type Required Description
symbol query symbol false Only return results for this symbol
from query TimestampEpoch false Epoch timestamp in ms
to query TimestampEpoch false Epoch timestamp in ms
status query OrderStatus false Order Status
limit query integer(int32) false Maximum amount of results to return in a single call. If omitted, 100 results are returned by default.

Enumerated Values

Parameter Value
status OPEN
status REJECTED
status CANCELED
status FILLED
status PART_FILLED
status EXPIRED
status PENDING

Example responses

200 Response

[
  {
    "exOrdId": "11111111",
    "clOrdId": "ABC",
    "ordType": "MARKET",
    "ordStatus": "FILLED",
    "side": "BUY",
    "price": 0.12345,
    "text": "string",
    "symbol": "BTC-USD",
    "lastShares": "0.5678",
    "lastPx": "3500.12",
    "leavesQty": "10.0",
    "cumQty": "0.123345",
    "avgPx": "345.33",
    "timestamp": "1592830770594"
  }
]

Responses

Status Meaning Description Schema
200 OK Success Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [OrderSummary] false none none
» exOrdId ExchangeOrderId(int64) false none The unique order id assigned by the exchange
» clOrdId ClientOrderId true none Reference field provided by client. Cannot exceed 20 characters, only alphanumeric characters are allowed.
» ordType ordType true none none
» ordStatus OrderStatus true none none
» side side true none "buy" for Buy, "sell" for Sell
» price price(double) false none The limit price for the order
» text string false none The reason for rejecting the order, if applicable
» symbol symbol true none Blockchain symbol identifier
» lastShares number(double) false none The executed quantity for the order's last fill
» lastPx number(double) false none The executed price for the last fill
» leavesQty number(double) false none For Open and Partially Filled orders this is the remaining quantity open for execution. For Canceled and Expired orders this is the quantity than was still open before cancellation/expiration. For Rejected order this is equal to orderQty. For other states this is always zero.
» cumQty number(double) false none The quantity of the order which has been filled
» avgPx number(double) false none Calculated the Volume Weighted Average Price of all fills for this order
» timestamp TimestampEpoch(int64) false none Time in ms since 01/01/1970 (epoch)

Enumerated Values

Property Value
ordType MARKET
ordType LIMIT
ordType STOP
ordType STOPLIMIT
ordStatus OPEN
ordStatus REJECTED
ordStatus CANCELED
ordStatus FILLED
ordStatus PART_FILLED
ordStatus EXPIRED
ordStatus PENDING
side BUY
side SELL

createOrder

Code samples

# You can also use wget
curl -X POST https://api.blockchain.com/v3/exchange/orders \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

POST https://api.blockchain.com/v3/exchange/orders HTTP/1.1
Host: api.blockchain.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "clOrdId": "123456",
  "ordType": "LIMIT",
  "symbol": "BTC-USD",
  "side": "BUY",
  "orderQty": "0.1",
  "price": "100"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/orders',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.post 'https://api.blockchain.com/v3/exchange/orders',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.post('https://api.blockchain.com/v3/exchange/orders', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.blockchain.com/v3/exchange/orders', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/orders");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.blockchain.com/v3/exchange/orders", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /orders

Add an order

Body parameter

{
  "clOrdId": "123456",
  "ordType": "LIMIT",
  "symbol": "BTC-USD",
  "side": "BUY",
  "orderQty": "0.1",
  "price": "100"
}

Parameters

Name In Type Required Description
body body BaseOrder true Trade
» clOrdId body ClientOrderId true Reference field provided by client. Cannot exceed 20 characters, only alphanumeric characters are allowed.
» ordType body ordType true none
» symbol body symbol true Blockchain symbol identifier
» side body side true "buy" for Buy, "sell" for Sell
» orderQty body orderQty(double) true The order size in the terms of the base currency
» timeInForce body TimeInForce false "GTC" for Good Till Cancel, "IOC" for Immediate or Cancel, "FOK" for Fill or Kill, "GTD" Good Till Date
» price body price(double) false The limit price for the order
» expireDate body expireDate false expiry date in the format YYYYMMDD
» minQty body minQty(double) false The minimum quantity required for an IOC fill
» stopPx body price(double) false The limit price for the order

Enumerated Values

Parameter Value
» ordType MARKET
» ordType LIMIT
» ordType STOP
» ordType STOPLIMIT
» side BUY
» side SELL
» timeInForce GTC
» timeInForce IOC
» timeInForce FOK
» timeInForce GTD

Example responses

200 Response

{
  "exOrdId": "11111111",
  "clOrdId": "ABC",
  "ordType": "MARKET",
  "ordStatus": "FILLED",
  "side": "BUY",
  "price": 0.12345,
  "text": "string",
  "symbol": "BTC-USD",
  "lastShares": "0.5678",
  "lastPx": "3500.12",
  "leavesQty": "10.0",
  "cumQty": "0.123345",
  "avgPx": "345.33",
  "timestamp": "1592830770594"
}

Responses

Status Meaning Description Schema
200 OK Success OrderSummary

deleteAllOrders

Code samples

# You can also use wget
curl -X DELETE https://api.blockchain.com/v3/exchange/orders \
  -H 'X-API-Token: API_KEY'

DELETE https://api.blockchain.com/v3/exchange/orders HTTP/1.1
Host: api.blockchain.com


const headers = {
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/orders',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'X-API-Token' => 'API_KEY'
}

result = RestClient.delete 'https://api.blockchain.com/v3/exchange/orders',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'X-API-Token': 'API_KEY'
}

r = requests.delete('https://api.blockchain.com/v3/exchange/orders', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.blockchain.com/v3/exchange/orders', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/orders");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.blockchain.com/v3/exchange/orders", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /orders

Delete all open orders (of a symbol, if specified)

Parameters

Name In Type Required Description
symbol query symbol false none

Responses

Status Meaning Description Schema
200 OK Success None

getOrderById

Code samples

# You can also use wget
curl -X GET https://api.blockchain.com/v3/exchange/orders/{orderId} \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

GET https://api.blockchain.com/v3/exchange/orders/{orderId} HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/orders/{orderId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.get 'https://api.blockchain.com/v3/exchange/orders/{orderId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.get('https://api.blockchain.com/v3/exchange/orders/{orderId}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.blockchain.com/v3/exchange/orders/{orderId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/orders/{orderId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.blockchain.com/v3/exchange/orders/{orderId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /orders/{orderId}

Get a specific order

Parameters

Name In Type Required Description
orderId path ExchangeOrderId true Order ID

Example responses

200 Response

{
  "exOrdId": "11111111",
  "clOrdId": "ABC",
  "ordType": "MARKET",
  "ordStatus": "FILLED",
  "side": "BUY",
  "price": 0.12345,
  "text": "string",
  "symbol": "BTC-USD",
  "lastShares": "0.5678",
  "lastPx": "3500.12",
  "leavesQty": "10.0",
  "cumQty": "0.123345",
  "avgPx": "345.33",
  "timestamp": "1592830770594"
}

Responses

Status Meaning Description Schema
200 OK Success OrderSummary
404 Not Found Not found None

deleteOrder

Code samples

# You can also use wget
curl -X DELETE https://api.blockchain.com/v3/exchange/orders/{orderId} \
  -H 'X-API-Token: API_KEY'

DELETE https://api.blockchain.com/v3/exchange/orders/{orderId} HTTP/1.1
Host: api.blockchain.com


const headers = {
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/orders/{orderId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'X-API-Token' => 'API_KEY'
}

result = RestClient.delete 'https://api.blockchain.com/v3/exchange/orders/{orderId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'X-API-Token': 'API_KEY'
}

r = requests.delete('https://api.blockchain.com/v3/exchange/orders/{orderId}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.blockchain.com/v3/exchange/orders/{orderId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/orders/{orderId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.blockchain.com/v3/exchange/orders/{orderId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /orders/{orderId}

Cancel a trade

Parameters

Name In Type Required Description
orderId path ExchangeOrderId true Order ID

Responses

Status Meaning Description Schema
200 OK Success None

getTrades

Code samples

# You can also use wget
curl -X GET https://api.blockchain.com/v3/exchange/trades \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

GET https://api.blockchain.com/v3/exchange/trades HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/trades',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.get 'https://api.blockchain.com/v3/exchange/trades',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.get('https://api.blockchain.com/v3/exchange/trades', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.blockchain.com/v3/exchange/trades', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/trades");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.blockchain.com/v3/exchange/trades", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /trades

Get a list of filled orders

Returns filled orders, including partial fills. Returns at most 100 results, use timestamp to paginate for further results

Parameters

Name In Type Required Description
symbol query symbol false Only return results for this symbol
from query TimestampEpoch false Epoch timestamp in ms
to query TimestampEpoch false Epoch timestamp in ms
limit query integer(int32) false Maximum amount of results to return in a single call. If omitted, 100 results are returned by default.

Example responses

200 Response

[
  {
    "exOrdId": "11111111",
    "clOrdId": "ABC",
    "ordType": "MARKET",
    "ordStatus": "FILLED",
    "side": "BUY",
    "price": 0.12345,
    "text": "string",
    "symbol": "BTC-USD",
    "lastShares": "0.5678",
    "lastPx": "3500.12",
    "leavesQty": "10.0",
    "cumQty": "0.123345",
    "avgPx": "345.33",
    "timestamp": "1592830770594"
  }
]

Responses

Status Meaning Description Schema
200 OK Success Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [OrderSummary] false none none
» exOrdId ExchangeOrderId(int64) false none The unique order id assigned by the exchange
» clOrdId ClientOrderId true none Reference field provided by client. Cannot exceed 20 characters, only alphanumeric characters are allowed.
» ordType ordType true none none
» ordStatus OrderStatus true none none
» side side true none "buy" for Buy, "sell" for Sell
» price price(double) false none The limit price for the order
» text string false none The reason for rejecting the order, if applicable
» symbol symbol true none Blockchain symbol identifier
» lastShares number(double) false none The executed quantity for the order's last fill
» lastPx number(double) false none The executed price for the last fill
» leavesQty number(double) false none For Open and Partially Filled orders this is the remaining quantity open for execution. For Canceled and Expired orders this is the quantity than was still open before cancellation/expiration. For Rejected order this is equal to orderQty. For other states this is always zero.
» cumQty number(double) false none The quantity of the order which has been filled
» avgPx number(double) false none Calculated the Volume Weighted Average Price of all fills for this order
» timestamp TimestampEpoch(int64) false none Time in ms since 01/01/1970 (epoch)

Enumerated Values

Property Value
ordType MARKET
ordType LIMIT
ordType STOP
ordType STOPLIMIT
ordStatus OPEN
ordStatus REJECTED
ordStatus CANCELED
ordStatus FILLED
ordStatus PART_FILLED
ordStatus EXPIRED
ordStatus PENDING
side BUY
side SELL

getFills

Code samples

# You can also use wget
curl -X GET https://api.blockchain.com/v3/exchange/fills \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

GET https://api.blockchain.com/v3/exchange/fills HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/fills',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.get 'https://api.blockchain.com/v3/exchange/fills',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.get('https://api.blockchain.com/v3/exchange/fills', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.blockchain.com/v3/exchange/fills', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/fills");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.blockchain.com/v3/exchange/fills", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /fills

Get a list of fills

Returns individual fills. Returns at most 1000 results, use timestamp and execId to navigate

Parameters

Name In Type Required Description
symbol query symbol false Only return results for this symbol
from query TimestampEpoch false Epoch timestamp in ms
fromExecId query ExecId false List from ExecId onwards
to query TimestampEpoch false Epoch timestamp in ms
toExecId query ExecId false List from ExecId backwards
limit query integer(int32) false Maximum amount of results to return in a single call. If omitted, 100 results are returned by default.

Example responses

200 Response

[
  {
    "exOrdId": "11111111",
    "tradeId": "11111111",
    "execId": "11111111",
    "side": "BUY",
    "symbol": "BTC-USD",
    "price": 0.12345,
    "qty": "10.23",
    "fee": "10.23",
    "timestamp": "1592830770594"
  }
]

Responses

Status Meaning Description Schema
200 OK Success Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Fill] false none none
» exOrdId ExchangeOrderId(int64) true none The unique order id assigned by the exchange
» tradeId TradeId(int64) true none The unique trade id assigned by the exchange
» execId ExecId(int64) true none The unique execution report id assigned by the exchange
» side side true none "buy" for Buy, "sell" for Sell
» symbol symbol true none Blockchain symbol identifier
» price price(double) true none The limit price for the order
» qty number(double) true none The trade size in the terms of the base currency
» fee number(double) true none The fee charged for this fill
» timestamp TimestampEpoch(int64) true none Time in ms since 01/01/1970 (epoch)

Enumerated Values

Property Value
side BUY
side SELL

Payments

Get account status and initiate deposits and withdrawals

getAccounts

Code samples

# You can also use wget
curl -X GET https://api.blockchain.com/v3/exchange/accounts \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

GET https://api.blockchain.com/v3/exchange/accounts HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/accounts',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.get 'https://api.blockchain.com/v3/exchange/accounts',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.get('https://api.blockchain.com/v3/exchange/accounts', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.blockchain.com/v3/exchange/accounts', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/accounts");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.blockchain.com/v3/exchange/accounts", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /accounts

Receive current account balances

Example responses

200 Response

{
  "primary": [
    {
      "currency": "BTC",
      "balance": "0.00366963",
      "available": "0.00266963",
      "balance_local": "38.746779155",
      "available_local": "28.188009155",
      "rate": "10558.77"
    }
  ],
  "property1": [
    {
      "currency": "BTC",
      "balance": "0.00366963",
      "available": "0.00266963",
      "balance_local": "38.746779155",
      "available_local": "28.188009155",
      "rate": "10558.77"
    }
  ],
  "property2": [
    {
      "currency": "BTC",
      "balance": "0.00366963",
      "available": "0.00266963",
      "balance_local": "38.746779155",
      "available_local": "28.188009155",
      "rate": "10558.77"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Success BalanceMap

getAccountByTypeAndCurrency

Code samples

# You can also use wget
curl -X GET https://api.blockchain.com/v3/exchange/accounts/{account}/{currency} \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

GET https://api.blockchain.com/v3/exchange/accounts/{account}/{currency} HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/accounts/{account}/{currency}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.get 'https://api.blockchain.com/v3/exchange/accounts/{account}/{currency}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.get('https://api.blockchain.com/v3/exchange/accounts/{account}/{currency}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.blockchain.com/v3/exchange/accounts/{account}/{currency}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/accounts/{account}/{currency}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.blockchain.com/v3/exchange/accounts/{account}/{currency}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /accounts/{account}/{currency}

Receive current account balances

Parameters

Name In Type Required Description
account path string true Account
currency path currency true Currency

Example responses

200 Response

{
  "currency": "BTC",
  "balance": "0.00366963",
  "available": "0.00266963",
  "balance_local": "38.746779155",
  "available_local": "28.188009155",
  "rate": "10558.77"
}

Responses

Status Meaning Description Schema
200 OK Success Balance

getDepositAddress

Code samples

# You can also use wget
curl -X POST https://api.blockchain.com/v3/exchange/deposits/{currency} \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

POST https://api.blockchain.com/v3/exchange/deposits/{currency} HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/deposits/{currency}',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.post 'https://api.blockchain.com/v3/exchange/deposits/{currency}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.post('https://api.blockchain.com/v3/exchange/deposits/{currency}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.blockchain.com/v3/exchange/deposits/{currency}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/deposits/{currency}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.blockchain.com/v3/exchange/deposits/{currency}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /deposits/{currency}

Get a deposit address. Currently only crypto currencies are supported

Parameters

Name In Type Required Description
currency path currency true Currency

Example responses

200 Response

{
  "type": "string",
  "address": "string"
}

Responses

Status Meaning Description Schema
200 OK Success DepositAddressCrypto

getDeposits

Code samples

# You can also use wget
curl -X GET https://api.blockchain.com/v3/exchange/deposits \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

GET https://api.blockchain.com/v3/exchange/deposits HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/deposits',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.get 'https://api.blockchain.com/v3/exchange/deposits',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.get('https://api.blockchain.com/v3/exchange/deposits', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.blockchain.com/v3/exchange/deposits', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/deposits");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.blockchain.com/v3/exchange/deposits", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /deposits

Get a list of deposits

Parameters

Name In Type Required Description
from query TimestampEpoch false Epoch timestamp in ms
to query TimestampEpoch false Epoch timestamp in ms

Example responses

200 Response

[
  {
    "depositId": "string",
    "amount": "12.23",
    "currency": "BTC",
    "address": "string",
    "txHash": "string",
    "state": "REJECTED",
    "timestamp": "1592830770594"
  }
]

Responses

Status Meaning Description Schema
200 OK Success Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [DepositInfo] false none none
» depositId DepositId true none Unique ID for this withdrawal
» amount number(double) true none The amount that is credited in the currency specified
» currency currency true none none
» address CryptoAddress true none Address to deposit to. If a tag or memo must be used, it is separated by a colon.
» txHash string false none The transaction hash of the transaction that deposited funds
» state string true none none
» timestamp TimestampEpoch(int64) false none Time in ms since 01/01/1970 (epoch)

Enumerated Values

Property Value
state REJECTED
state UNCONFIRMED
state COMPLETED

getDepositById

Code samples

# You can also use wget
curl -X GET https://api.blockchain.com/v3/exchange/deposits/{depositId} \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

GET https://api.blockchain.com/v3/exchange/deposits/{depositId} HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/deposits/{depositId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.get 'https://api.blockchain.com/v3/exchange/deposits/{depositId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.get('https://api.blockchain.com/v3/exchange/deposits/{depositId}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.blockchain.com/v3/exchange/deposits/{depositId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/deposits/{depositId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.blockchain.com/v3/exchange/deposits/{depositId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /deposits/{depositId}

Get status about a deposit

Parameters

Name In Type Required Description
depositId path string true Deposit ID

Example responses

200 Response

{
  "depositId": "string",
  "amount": "12.23",
  "currency": "BTC",
  "address": "string",
  "txHash": "string",
  "state": "REJECTED",
  "timestamp": "1592830770594"
}

Responses

Status Meaning Description Schema
200 OK Success DepositInfo
404 Not Found Not found None

getWhitelist

Code samples

# You can also use wget
curl -X GET https://api.blockchain.com/v3/exchange/whitelist \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

GET https://api.blockchain.com/v3/exchange/whitelist HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/whitelist',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.get 'https://api.blockchain.com/v3/exchange/whitelist',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.get('https://api.blockchain.com/v3/exchange/whitelist', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.blockchain.com/v3/exchange/whitelist', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/whitelist");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.blockchain.com/v3/exchange/whitelist", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /whitelist

Get a list of all whitelisted withdrawal accounts

Example responses

200 Response

[
  {
    "whitelistId": "string",
    "name": "string",
    "currency": "BTC"
  }
]

Responses

Status Meaning Description Schema
200 OK Success Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [WhitelistEntry] false none none
» whitelistId string false none Unique ID for each whitelist entry
» name string false none User specified name for this entry
» currency currency false none none

getWhitelistByCurrency

Code samples

# You can also use wget
curl -X GET https://api.blockchain.com/v3/exchange/whitelist/{currency} \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

GET https://api.blockchain.com/v3/exchange/whitelist/{currency} HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/whitelist/{currency}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.get 'https://api.blockchain.com/v3/exchange/whitelist/{currency}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.get('https://api.blockchain.com/v3/exchange/whitelist/{currency}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.blockchain.com/v3/exchange/whitelist/{currency}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/whitelist/{currency}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.blockchain.com/v3/exchange/whitelist/{currency}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /whitelist/{currency}

Get a list of all whitelisted withdrawal accounts

Parameters

Name In Type Required Description
currency path currency true Currency

Example responses

200 Response

[
  {
    "whitelistId": "string",
    "name": "string",
    "currency": "BTC"
  }
]

Responses

Status Meaning Description Schema
200 OK Success Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [WhitelistEntry] false none none
» whitelistId string false none Unique ID for each whitelist entry
» name string false none User specified name for this entry
» currency currency false none none

getWithdrawals

Code samples

# You can also use wget
curl -X GET https://api.blockchain.com/v3/exchange/withdrawals \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

GET https://api.blockchain.com/v3/exchange/withdrawals HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/withdrawals',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.get 'https://api.blockchain.com/v3/exchange/withdrawals',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.get('https://api.blockchain.com/v3/exchange/withdrawals', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.blockchain.com/v3/exchange/withdrawals', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/withdrawals");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.blockchain.com/v3/exchange/withdrawals", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /withdrawals

Get a list of withdrawals

Parameters

Name In Type Required Description
from query TimestampEpoch false Epoch timestamp in ms
to query TimestampEpoch false Epoch timestamp in ms

Example responses

200 Response

[
  {
    "withdrawalId": "string",
    "amount": "12.23",
    "fee": "0.0005",
    "currency": "BTC",
    "beneficiary": "string",
    "state": "REJECTED",
    "timestamp": "1592830770594"
  }
]

Responses

Status Meaning Description Schema
200 OK Success Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [WithdrawalInfo] false none none
» withdrawalId WithdrawalId false none Unique ID for this withdrawal
» amount WithdrawalAmount(double) true none The amount to withdraw in the currency specified
» fee WithdrawalFee(double) false none The amount charged in fees for this withdrawal
» currency currency true none none
» beneficiary WithdrawalBeneficiary true none none
» state WithdrawalStatus false none none
» timestamp TimestampEpoch(int64) false none Time in ms since 01/01/1970 (epoch)

Enumerated Values

Property Value
state REJECTED
state PENDING
state REFUNDED
state FAILED
state COMPLETED

createWithdrawal

Code samples

# You can also use wget
curl -X POST https://api.blockchain.com/v3/exchange/withdrawals \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

POST https://api.blockchain.com/v3/exchange/withdrawals HTTP/1.1
Host: api.blockchain.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "amount": "12.23",
  "currency": "BTC",
  "beneficiary": "string",
  "sendMax": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/withdrawals',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.post 'https://api.blockchain.com/v3/exchange/withdrawals',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.post('https://api.blockchain.com/v3/exchange/withdrawals', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.blockchain.com/v3/exchange/withdrawals', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/withdrawals");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.blockchain.com/v3/exchange/withdrawals", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /withdrawals

Request a withdrawal

Call GET /whitelist first to retrieve the ID of the beneficiary. To add a beneficiary to the whitelist, please visit the profile page in the Exchange. This call only works if 2FA is enabled on the account.

Body parameter

{
  "amount": "12.23",
  "currency": "BTC",
  "beneficiary": "string",
  "sendMax": true
}

Parameters

Name In Type Required Description
body body CreateWithdrawalRequest true none
» amount body WithdrawalAmount(double) false The amount to withdraw in the currency specified
» currency body currency true none
» beneficiary body WithdrawalBeneficiary true none
» sendMax body boolean false If set, sends the full available amount, minus fees. Amount may not be specified in that case.

Example responses

200 Response

{
  "withdrawalId": "string",
  "amount": "12.23",
  "fee": "0.0005",
  "currency": "BTC",
  "beneficiary": "string",
  "state": "REJECTED",
  "timestamp": "1592830770594"
}

Responses

Status Meaning Description Schema
200 OK Success WithdrawalInfo

getWithdrawalById

Code samples

# You can also use wget
curl -X GET https://api.blockchain.com/v3/exchange/withdrawals/{withdrawalId} \
  -H 'Accept: application/json' \
  -H 'X-API-Token: API_KEY'

GET https://api.blockchain.com/v3/exchange/withdrawals/{withdrawalId} HTTP/1.1
Host: api.blockchain.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'X-API-Token':'API_KEY'
};

fetch('https://api.blockchain.com/v3/exchange/withdrawals/{withdrawalId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-API-Token' => 'API_KEY'
}

result = RestClient.get 'https://api.blockchain.com/v3/exchange/withdrawals/{withdrawalId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'X-API-Token': 'API_KEY'
}

r = requests.get('https://api.blockchain.com/v3/exchange/withdrawals/{withdrawalId}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'X-API-Token' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.blockchain.com/v3/exchange/withdrawals/{withdrawalId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.blockchain.com/v3/exchange/withdrawals/{withdrawalId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "X-API-Token": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.blockchain.com/v3/exchange/withdrawals/{withdrawalId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /withdrawals/{withdrawalId}

Get status about a withdrawal

Parameters

Name In Type Required Description
withdrawalId path string true Withdrawal ID

Example responses

200 Response

{
  "withdrawalId": "string",
  "amount": "12.23",
  "fee": "0.0005",
  "currency": "BTC",
  "beneficiary": "string",
  "state": "REJECTED",
  "timestamp": "1592830770594"
}

Responses

Status Meaning Description Schema
200 OK Success WithdrawalInfo
404 Not Found Not found None

Schemas

TimestampEpoch

"1592830770594"

Time in ms since 01/01/1970 (epoch)

Properties

Name Type Required Restrictions Description
anonymous integer(int64) false none Time in ms since 01/01/1970 (epoch)

symbol

"BTC-USD"

Blockchain symbol identifier

Properties

Name Type Required Restrictions Description
anonymous string false none Blockchain symbol identifier

currency

"BTC"

Properties

Name Type Required Restrictions Description
anonymous string false none none

ExchangeOrderId

"11111111"

The unique order id assigned by the exchange

Properties

Name Type Required Restrictions Description
anonymous integer(int64) false none The unique order id assigned by the exchange

TradeId

"11111111"

The unique trade id assigned by the exchange

Properties

Name Type Required Restrictions Description
anonymous integer(int64) false none The unique trade id assigned by the exchange

ExecId

"11111111"

The unique execution report id assigned by the exchange

Properties

Name Type Required Restrictions Description
anonymous integer(int64) false none The unique execution report id assigned by the exchange

ClientOrderId

"ABC"

Reference field provided by client. Cannot exceed 20 characters, only alphanumeric characters are allowed.

Properties

Name Type Required Restrictions Description
anonymous string false none Reference field provided by client. Cannot exceed 20 characters, only alphanumeric characters are allowed.

WithdrawalId

"string"

Unique ID for this withdrawal

Properties

Name Type Required Restrictions Description
anonymous string false none Unique ID for this withdrawal

WithdrawalStatus

"REJECTED"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous REJECTED
anonymous PENDING
anonymous REFUNDED
anonymous FAILED
anonymous COMPLETED

WithdrawalAmount

"12.23"

The amount to withdraw in the currency specified

Properties

Name Type Required Restrictions Description
anonymous number(double) false none The amount to withdraw in the currency specified

WithdrawalFee

"0.0005"

The amount charged in fees for this withdrawal

Properties

Name Type Required Restrictions Description
anonymous number(double) false none The amount charged in fees for this withdrawal

WithdrawalBeneficiary

"string"

Properties

Name Type Required Restrictions Description
anonymous string false none none

WithdrawalInfo

{
  "withdrawalId": "string",
  "amount": "12.23",
  "fee": "0.0005",
  "currency": "BTC",
  "beneficiary": "string",
  "state": "REJECTED",
  "timestamp": "1592830770594"
}

Properties

Name Type Required Restrictions Description
withdrawalId WithdrawalId false none Unique ID for this withdrawal
amount WithdrawalAmount true none The amount to withdraw in the currency specified
fee WithdrawalFee false none The amount charged in fees for this withdrawal
currency currency true none none
beneficiary WithdrawalBeneficiary true none none
state WithdrawalStatus false none none
timestamp TimestampEpoch false none Time in ms since 01/01/1970 (epoch)

DepositId

"string"

Unique ID for this withdrawal

Properties

Name Type Required Restrictions Description
anonymous string false none Unique ID for this withdrawal

CryptoAddress

"string"

Address to deposit to. If a tag or memo must be used, it is separated by a colon.

Properties

Name Type Required Restrictions Description
anonymous string false none Address to deposit to. If a tag or memo must be used, it is separated by a colon.

DepositAmount

"12.23"

The amount that is credited in the currency specified

Properties

Name Type Required Restrictions Description
anonymous number(double) false none The amount that is credited in the currency specified

DepositInfo

{
  "depositId": "string",
  "amount": "12.23",
  "currency": "BTC",
  "address": "string",
  "txHash": "string",
  "state": "REJECTED",
  "timestamp": "1592830770594"
}

Properties

Name Type Required Restrictions Description
depositId DepositId true none Unique ID for this withdrawal
amount number(double) true none The amount that is credited in the currency specified
currency currency true none none
address CryptoAddress true none Address to deposit to. If a tag or memo must be used, it is separated by a colon.
txHash string false none The transaction hash of the transaction that deposited funds
state string true none none
timestamp TimestampEpoch false none Time in ms since 01/01/1970 (epoch)

Enumerated Values

Property Value
state REJECTED
state UNCONFIRMED
state COMPLETED

OrderStatus

"FILLED"

Properties

Name Type Required Restrictions Description
anonymous string false none none

Enumerated Values

Property Value
anonymous OPEN
anonymous REJECTED
anonymous CANCELED
anonymous FILLED
anonymous PART_FILLED
anonymous EXPIRED
anonymous PENDING

TimeInForce

"GTC"

"GTC" for Good Till Cancel, "IOC" for Immediate or Cancel, "FOK" for Fill or Kill, "GTD" Good Till Date

Properties

Name Type Required Restrictions Description
anonymous string false none "GTC" for Good Till Cancel, "IOC" for Immediate or Cancel, "FOK" for Fill or Kill, "GTD" Good Till Date

Enumerated Values

Property Value
anonymous GTC
anonymous IOC
anonymous FOK
anonymous GTD

timeInForceStop

"GTC"

"GTC" for Good Till Cancel, "GTD" Good Till Date

Properties

Name Type Required Restrictions Description
anonymous string false none "GTC" for Good Till Cancel, "GTD" Good Till Date

Enumerated Values

Property Value
anonymous GTC
anonymous GTD

side

"BUY"

"buy" for Buy, "sell" for Sell

Properties

Name Type Required Restrictions Description
anonymous string false none "buy" for Buy, "sell" for Sell

Enumerated Values

Property Value
anonymous BUY
anonymous SELL

orderQty

"10.23"

The order size in the terms of the base currency

Properties

Name Type Required Restrictions Description
anonymous number(double) false none The order size in the terms of the base currency

price

0.12345

The limit price for the order

Properties

Name Type Required Restrictions Description
anonymous number(double) false none The limit price for the order

expireDate

"20200103"

expiry date in the format YYYYMMDD

Properties

Name Type Required Restrictions Description
anonymous integer false none expiry date in the format YYYYMMDD

stopPx

"3500.12"

Price to trigger the stop order

Properties

Name Type Required Restrictions Description
anonymous number(double) false none Price to trigger the stop order

minQty

"10.0"

The minimum quantity required for an IOC fill

Properties

Name Type Required Restrictions Description
anonymous number(double) false none The minimum quantity required for an IOC fill

execInst

"ALO"

The order is placed with Add Liquidity Only (aka Post Only): it will not match liquidity immediately. It will be rejected instead of matching liquidity in the market.

Properties

Name Type Required Restrictions Description
anonymous string false none The order is placed with Add Liquidity Only (aka Post Only): it will not match liquidity immediately. It will be rejected instead of matching liquidity in the market.

ordType

"MARKET"

Order type

Properties

Name Type Required Restrictions Description
Order type string false none none

Enumerated Values

Property Value
Order type MARKET
Order type LIMIT
Order type STOP
Order type STOPLIMIT

BaseOrder

{
  "clOrdId": "123456",
  "ordType": "LIMIT",
  "symbol": "BTC-USD",
  "side": "BUY",
  "orderQty": "0.1",
  "price": "100"
}

Properties

Name Type Required Restrictions Description
clOrdId ClientOrderId true none Reference field provided by client. Cannot exceed 20 characters, only alphanumeric characters are allowed.
ordType ordType true none none
symbol symbol true none Blockchain symbol identifier
side side true none "buy" for Buy, "sell" for Sell
orderQty orderQty true none The order size in the terms of the base currency
timeInForce TimeInForce false none "GTC" for Good Till Cancel, "IOC" for Immediate or Cancel, "FOK" for Fill or Kill, "GTD" Good Till Date
price price false none The limit price for the order
expireDate expireDate false none expiry date in the format YYYYMMDD
minQty minQty false none The minimum quantity required for an IOC fill
stopPx price false none The limit price for the order

PaginatedOrderSummary

{
  "nextOrderId": "11111111",
  "orders": [
    {
      "exOrdId": "11111111",
      "clOrdId": "ABC",
      "ordType": "MARKET",
      "ordStatus": "FILLED",
      "side": "BUY",
      "price": 0.12345,
      "text": "string",
      "symbol": "BTC-USD",
      "lastShares": "0.5678",
      "lastPx": "3500.12",
      "leavesQty": "10.0",
      "cumQty": "0.123345",
      "avgPx": "345.33",
      "timestamp": "1592830770594"
    }
  ]
}

Properties

Name Type Required Restrictions Description
nextOrderId ExchangeOrderId true none The unique order id assigned by the exchange
orders [OrderSummary] true none none

OrderSummary

{
  "exOrdId": "11111111",
  "clOrdId": "ABC",
  "ordType": "MARKET",
  "ordStatus": "FILLED",
  "side": "BUY",
  "price": 0.12345,
  "text": "string",
  "symbol": "BTC-USD",
  "lastShares": "0.5678",
  "lastPx": "3500.12",
  "leavesQty": "10.0",
  "cumQty": "0.123345",
  "avgPx": "345.33",
  "timestamp": "1592830770594"
}

Properties

Name Type Required Restrictions Description
exOrdId ExchangeOrderId false none The unique order id assigned by the exchange
clOrdId ClientOrderId true none Reference field provided by client. Cannot exceed 20 characters, only alphanumeric characters are allowed.
ordType ordType true none none
ordStatus OrderStatus true none none
side side true none "buy" for Buy, "sell" for Sell
price price false none The limit price for the order
text string false none The reason for rejecting the order, if applicable
symbol symbol true none Blockchain symbol identifier
lastShares number(double) false none The executed quantity for the order's last fill
lastPx number(double) false none The executed price for the last fill
leavesQty number(double) false none For Open and Partially Filled orders this is the remaining quantity open for execution. For Canceled and Expired orders this is the quantity than was still open before cancellation/expiration. For Rejected order this is equal to orderQty. For other states this is always zero.
cumQty number(double) false none The quantity of the order which has been filled
avgPx number(double) false none Calculated the Volume Weighted Average Price of all fills for this order
timestamp TimestampEpoch false none Time in ms since 01/01/1970 (epoch)

Fill

{
  "exOrdId": "11111111",
  "tradeId": "11111111",
  "execId": "11111111",
  "side": "BUY",
  "symbol": "BTC-USD",
  "price": 0.12345,
  "qty": "10.23",
  "fee": "10.23",
  "timestamp": "1592830770594"
}

Properties

Name Type Required Restrictions Description
exOrdId ExchangeOrderId true none The unique order id assigned by the exchange
tradeId TradeId true none The unique trade id assigned by the exchange
execId ExecId true none The unique execution report id assigned by the exchange
side side true none "buy" for Buy, "sell" for Sell
symbol symbol true none Blockchain symbol identifier
price price true none The limit price for the order
qty number(double) true none The trade size in the terms of the base currency
fee number(double) true none The fee charged for this fill
timestamp TimestampEpoch true none Time in ms since 01/01/1970 (epoch)

CancelOrderRequest

{
  "action": "CancelOrderRequest",
  "orderID": "11111111"
}

Properties

Name Type Required Restrictions Description
action string true none none
orderID ExchangeOrderId true none The unique order id assigned by the exchange

Enumerated Values

Property Value
action CancelOrderRequest

BalanceMap

{
  "primary": [
    {
      "currency": "BTC",
      "balance": "0.00366963",
      "available": "0.00266963",
      "balance_local": "38.746779155",
      "available_local": "28.188009155",
      "rate": "10558.77"
    }
  ],
  "property1": [
    {
      "currency": "BTC",
      "balance": "0.00366963",
      "available": "0.00266963",
      "balance_local": "38.746779155",
      "available_local": "28.188009155",
      "rate": "10558.77"
    }
  ],
  "property2": [
    {
      "currency": "BTC",
      "balance": "0.00366963",
      "available": "0.00266963",
      "balance_local": "38.746779155",
      "available_local": "28.188009155",
      "rate": "10558.77"
    }
  ]
}

Properties

Name Type Required Restrictions Description
additionalProperties BalanceList false none none
primary BalanceList true none none

BalanceList

[
  {
    "currency": "BTC",
    "balance": "0.00366963",
    "available": "0.00266963",
    "balance_local": "38.746779155",
    "available_local": "28.188009155",
    "rate": "10558.77"
  }
]

Properties

Name Type Required Restrictions Description
anonymous [Balance] false none none

Balance

{
  "currency": "BTC",
  "balance": "0.00366963",
  "available": "0.00266963",
  "balance_local": "38.746779155",
  "available_local": "28.188009155",
  "rate": "10558.77"
}

Properties

Name Type Required Restrictions Description
currency currency true none none
balance number(double) true none none
available number(double) true none none
balance_local number(double) true none none
available_local number(double) true none none
rate number(double) true none none

Fees

{
  "makerRate": "0.0014",
  "takerRate": "0.0024",
  "volumeInUSD": "1500.00"
}

Properties

Name Type Required Restrictions Description
makerRate number(double) true none none
takerRate number(double) true none none
volumeInUSD number(double) true none none

WhitelistEntry

{
  "whitelistId": "string",
  "name": "string",
  "currency": "BTC"
}

Properties

Name Type Required Restrictions Description
whitelistId string false none Unique ID for each whitelist entry
name string false none User specified name for this entry
currency currency false none none

CreateWithdrawalRequest

{
  "amount": "12.23",
  "currency": "BTC",
  "beneficiary": "string",
  "sendMax": true
}

Properties

Name Type Required Restrictions Description
amount WithdrawalAmount false none The amount to withdraw in the currency specified
currency currency true none none
beneficiary WithdrawalBeneficiary true none none
sendMax boolean false none If set, sends the full available amount, minus fees. Amount may not be specified in that case.

DepositAddressCrypto

{
  "type": "string",
  "address": "string"
}

Properties

Name Type Required Restrictions Description
type string true none none
address string true none Address to deposit to. If a tag or memo must be used, it is separated by a colon.

PriceEvent

{
  "symbol": "BTC-USD",
  "price_24h": "4998.0",
  "volume_24h": "0.3015",
  "last_trade_price": "5000.0"
}

Properties

Name Type Required Restrictions Description
symbol symbol false none Blockchain symbol identifier
price_24h number(double) false none none
volume_24h number(double) false none none
last_trade_price number(double) false none none

PriceEventList

{
  "orders": [
    {
      "symbol": "BTC-USD",
      "price_24h": "4998.0",
      "volume_24h": "0.3015",
      "last_trade_price": "5000.0"
    }
  ]
}

Properties

Name Type Required Restrictions Description
orders [PriceEvent] false none none

SymbolStatus

{
  "base_currency": "BTC-USD",
  "base_currency_scale": 8,
  "counter_currency": "BTC-USD",
  "counter_currency_scale": 2,
  "min_price_increment": 10,
  "min_price_increment_scale": 0,
  "min_order_size": 10,
  "min_order_size_scale": 2,
  "max_order_size": 0,
  "max_order_size_scale": 8,
  "lot_size": 5,
  "lot_size_scale": 2,
  "status": "open",
  "id": 1,
  "auction_price": 0,
  "auction_size": 0,
  "auction_time": "1530",
  "imbalance": 0
}

Properties

Name Type Required Restrictions Description
base_currency symbol false none Blockchain symbol identifier
base_currency_scale integer false none The number of decimals the currency can be split in
counter_currency symbol false none Blockchain symbol identifier
counter_currency_scale integer false none The number of decimals the currency can be split in
min_price_increment integer(int64) false none The price of the instrument must be a multiple of min_price_increment * (10^-min_price_increment_scale)
min_price_increment_scale integer false none none
min_order_size integer(int64) false none The minimum quantity for an order for this instrument must be min_order_size*(10^-min_order_size_scale)
min_order_size_scale integer false none none
max_order_size integer(int64) false none The maximum quantity for an order for this instrument is max_order_size*(10^-max_order_size_scale). If this equal to zero, there is no limit
max_order_size_scale integer false none none
lot_size integer(int64) false none none
lot_size_scale integer false none none
status string false none Symbol status; open, close, suspend, halt, halt-freeze.
id integer(int64) false none none
auction_price number(double) false none If the symbol is halted and will open on an auction, this will be the opening price.
auction_size number(double) false none Opening size
auction_time string false none Opening time in HHMM format
imbalance number(double) false none Auction imbalance. If > 0 then there will be buy orders left over at the auction price. If < 0 then there will be sell orders left over at the auction price.

Enumerated Values

Property Value
status open
status close
status suspend
status halt
status halt-freeze

OrderBookEntry

{
  "px": "8723.45",
  "qty": "1.45",
  "num": "1"
}

Properties

Name Type Required Restrictions Description
px number(double) false none none
qty number(double) false none none
num integer(int64) false none Either the quantity of orders on this price level for L2, or the individual order id for L3

OrderBook

{
  "symbol": "BTC-USD",
  "bids": [
    {
      "px": "8723.45",
      "qty": "1.45",
      "num": "1"
    }
  ],
  "asks": [
    {
      "px": "8723.45",
      "qty": "1.45",
      "num": "1"
    }
  ]
}

Properties

Name Type Required Restrictions Description
symbol symbol false none Blockchain symbol identifier
bids [OrderBookEntry] false none none
asks [OrderBookEntry] false none none

UnauthorizedError

{
  "error": "string"
}

API key is missing or invalid

Properties

Name Type Required Restrictions Description
error string false none none