NAV
shell

Introduction

Welcome to the Bitwyre API!

All API URLs should use the base URL https://api.bitwyre.com for REST, and wss://api.bitwyre.com/ws for Websocket.

We have APIs for REST Public, REST Private, Websocket Public, and Websocket Private.

All endpoints returns either a JSON object or array along with some error messages (REST only, if any).

REST APIs

Example: REST On success

{
  "error": [],
  "result": {"some array or object of result(s)"}
}

Example: REST On error

{
  "error": ["some (array) of error message(s)"],
  "result": {}
}

Websocket APIs

All of the examples are using Websocat, to install it you need Rust's Cargo and execute cargo install --features=ssl websocat.

By its responses, both Public & Private, Websocket APIs both Public and Private can be categorized as:

Authentication

Bitwyre uses HTTP Header authentication to allow access to the Private API.

REST Private API Request Headers

Example: REST GET private/account/balance

curl "https://api.bitwyre.com/private/orders" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-type: application/json" \
  -X POST \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"cd94e66609492952b26a4f3b29949d58548e9bd5e7bdd72598e441c6a57e57f4\",\
        \"payload\": {\
          \"pair\": \"btc_idr\",\
          \"type\": \"buy\",\
          \"ordertype\": \"limit\",\
          \"price\": \"125000000\",\
          \"volume\": \"500000\"\
        }\
      }"

Make sure to fill all fields with the correct ones.

All Private API endpoints expects for the following headers to be included in all API requests:

Header Key Data Type Required Remark
"API-Key" string true unique API-Key bounded to a user, see API Key.
"API-Sign" string true request signature, see API Sign.
"Content-type" string varies always application/json for POST & DELETE

API Key

You can get a new Bitwyre API key pairs (api-key and api-secret) at our developer portal.

API Sign

The signature, we call it API-Sign, is created using HMAC-SHA512 of (URI path + SHA256(nonce + checksum)) and api-secret, see REST Private API Data.

For websocket, signature is created using HMAC-SHA512 of api-secret.

The URI path is the endpoint path, e.g /private/orders.

REST Private API Request Data

All Private API endpoints expect for the follow json data structure (form/query url for GET) to be included in all API requests:

JSON Field Data Type Required Remark
"nonce" big-integer true always increasing unsigned 64 bit integer, see Cryptographic Nonce.
"checksum" string true SHA256 hash of "payload".
"payload" json-object/json-array varies endpoint specific request payload data.

Websocket Private API Request Data

Example: Websocket Subscribe Request (Note: minify the json request for websocat)

websocat -E wss://api.bitwyre.com/ws/private/orders
>{
  "command": "create",
  "nonce": 1573882687533732677,
  "checksum": "cd94e66609492952b26a4f3b29949d58548e9bd5e7bdd72598e441c6a57e57f4",
  "api_key": "user_apikey",
  "api_sign": "request_signature",
  "payload": {
    "pair": "btc_idr_spot",
    "type": "buy",
    "ordertype": "limit",
    "price": "125000000",
    "volume": "500000"
  }
}

The Websocket Private API expects no HTTP Headers, bellow json data structure is needed for any secure request.

JSON Field Data Type Required Remark
"command" string true endpoint specific command.
"nonce" big-integer true see REST Private API Request Data.
"checksum" string true see REST Private API Request Data.
"api_key" string true see API Key.
"api_sign" string true see API Sign.
"payload" json-object/array true endpoint specific request payload data.

Public API Endpoints

Server Time

Request

curl "https://api.bitwyre.com/public/time" -X GET

Response

{
  "error": [],
  "result": {
    "unixtime": 1571744594571020435
  }
}

Returns server's time.

This helps in approximating the time difference between the server and client.

Endpoint

https://api.bitwyre.com/public/time

Request Fields/Parameters

Response Types (JSON Object)

JSON Field Data Type Remark
unixtime big-integer unix time in nanoseconds

Markets

Request

curl "https://api.bitwyre.com/public/markets" -X GET

Response

{
  "error": [],
  "result": [
    "crypto",
    "equities",
    "stablecoin",
    "commodities",
    "fixed_income",
    "carbon"
  ]
}

Returns an underscore _ delimited tradable markets array

Endpoint

https://api.bitwyre.com/public/markets

Request Fields/Parameters

Response Types (JSON Array)

JSON Field Data Type Remark
JSON-array string Returns an underscore _ delimited tradable markets array

Products

Request

curl "https://api.bitwyre.com/public/products" -X GET

Response

{
  "error": [],
  "result": ["spot", "futures", "options", "swaps", "spreads"]
}

Returns an underscore _ delimited tradable products array

Endpoint

https://api.bitwyre.com/public/products

Request Fields/Parameters

Response Types (JSON Array)

JSON Field Data Type Remark
JSON-array string Returns an underscore _ delimited tradable products array

Assets

Request

curl "https://api.bitwyre.com/public/assets" -X GET

Response

{
  "error": [],
  "result": [
    {
      "asset": "btc",
      "btc_equivalent": "1",
      "icon_url": "https://storage.bitwyre.com/assets/btc.png",
      "is_deposit_enabled": true,
      "is_trading_enabled": true,
      "is_withdraw_enabled": true,
      "local_equivalent": "",
      "local_reference": "",
      "max_withdrawal": "10",
      "min_withdrawal": "0.001",
      "name": "Bitcoin",
      "precision": "1e-8",
      "withdrawal_fee": "0.00000001"
    },
    {
      "asset": "eth",
      "btc_equivalent": "",
      "icon_url": "https://storage.bitwyre.com/public/images/coins/raster/ETH_500px.png",
      "is_deposit_enabled": true,
      "is_trading_enabled": true,
      "is_withdraw_enabled": true,
      "local_equivalent": "",
      "local_reference": "",
      "max_withdrawal": "10",
      "min_withdrawal": "0.001",
      "name": "Ethereum",
      "precision": "1e-9",
      "withdrawal_fee": "0.00000001"
    },
    {
      "asset": "xmr",
      "btc_equivalent": "",
      "icon_url": "https://storage.bitwyre.com/public/images/coins/raster/XMR_500px.png",
      "is_deposit_enabled": true,
      "is_trading_enabled": true,
      "is_withdraw_enabled": true,
      "local_equivalent": "",
      "local_reference": "",
      "max_withdrawal": "10",
      "min_withdrawal": "0.001",
      "name": "Monero",
      "precision": "1e-12",
      "withdrawal_fee": "0.00000001"
    },
    {
      "asset": "zec",
      "btc_equivalent": "",
      "icon_url": "https://storage.bitwyre.com/public/images/coins/raster/ZEC_500px.png",
      "is_deposit_enabled": true,
      "is_trading_enabled": true,
      "is_withdraw_enabled": true,
      "local_equivalent": "",
      "local_reference": "",
      "max_withdrawal": "10",
      "min_withdrawal": "0.001",
      "name": "ZCash",
      "precision": "1e-8",
      "withdrawal_fee": "0.00000001"
    },
    {
      "asset": "usdt",
      "btc_equivalent": "",
      "icon_url": "https://storage.bitwyre.com/assets/usdt.png",
      "is_deposit_enabled": true,
      "is_trading_enabled": true,
      "is_withdraw_enabled": true,
      "local_equivalent": "",
      "local_reference": "",
      "max_withdrawal": "",
      "min_withdrawal": "20000",
      "name": "USD Tether Stablecoin",
      "precision": "1e-6",
      "withdrawal_fee": "10000"
    },
    {
      "asset": "idr",
      "btc_equivalent": "",
      "icon_url": "https://storage.bitwyre.com/public/images/coins/raster/IDR.png",
      "is_deposit_enabled": true,
      "is_trading_enabled": true,
      "is_withdraw_enabled": true,
      "local_equivalent": "",
      "local_reference": "",
      "max_withdrawal": "100000000",
      "min_withdrawal": "100000",
      "name": "Indonesian Rupiah",
      "precision": "1",
      "withdrawal_fee": "0"
    },
    {
      "asset": "usd",
      "btc_equivalent": "",
      "icon_url": "https://storage.bitwyre.com/assets/usd.png",
      "is_deposit_enabled": true,
      "is_trading_enabled": true,
      "is_withdraw_enabled": true,
      "local_equivalent": "",
      "local_reference": "",
      "max_withdrawal": "",
      "min_withdrawal": "20000",
      "name": "United States Dollar",
      "precision": "1e-2",
      "withdrawal_fee": "10000"
    },
    {
      "asset": "brl",
      "btc_equivalent": "",
      "icon_url": "https://storage.bitwyre.com/public/images/fiats/raster/brl.png",
      "is_deposit_enabled": true,
      "is_trading_enabled": true,
      "is_withdraw_enabled": true,
      "local_equivalent": "",
      "local_reference": "",
      "max_withdrawal": "",
      "min_withdrawal": "20000",
      "name": "Brazilian Real",
      "precision": "1e-2",
      "withdrawal_fee": "10000"
    },
    {
      "asset": "mxn",
      "btc_equivalent": "",
      "icon_url": "https://storage.bitwyre.com/public/images/fiats/raster/mxn.png",
      "is_deposit_enabled": true,
      "is_trading_enabled": true,
      "is_withdraw_enabled": true,
      "local_equivalent": "",
      "local_reference": "",
      "max_withdrawal": "",
      "min_withdrawal": "20000",
      "name": "Mexican Peso",
      "precision": "1e-2",
      "withdrawal_fee": "10000"
    }
  ]
}

Returns an array filled with supported assets.

Endpoint

https://api.bitwyre.com/public/assets

Request Fields/Parameters

Response Types (JSON Array)

JSON Field Data Type Remark
JSON-array string Returns an an array filled with tradable products

Crypto Assets

Request

curl "https://api.bitwyre.com/public/assets/crypto" -X GET

Response

{
  "error": [],
  "result": [
    {
      "asset": "btc",
      "btc_equivalent": "1.000000000000000",
      "icon_url": "https://storage.bitwyre.com/assets/btc.png",
      "is_deposit_enabled": true,
      "is_trading_enabled": true,
      "is_withdraw_enabled": true,
      "local_equivalent": "",
      "local_reference": "",
      "market_cap_rank": "1",
      "market_cap_usd": "420000000000",
      "max_withdrawal": "10",
      "min_deposit": "0",
      "min_order_size": "0.00001",
      "min_order_size_increment": "0.00001",
      "min_price_increment_usd": "0.01",
      "min_withdrawal": "0.001",
      "name": "Bitcoin",
      "network_list": [
            {
                "network_name": "Bitcoin",
                "network_id": "BTC",
                "asset_type": "coin",
                "address_tag": "",
                "token_type": "",
                "address_regex": "^(tb1)[a-zA-Z0-9]{39}$|^(m|n)[a-zA-Z0-9]{33}$",
                "memo_regex": "",
                "is_contains_address_tag": false,
                "is_network_deposit_enabled": true,
                "is_network_withdraw_enabled": true,
                "is_default_network": true,
                "network_confirmations": 1,
                "max_withdrawal": "100",
                "min_deposit": "0.0001",
                "min_withdrawal": "0",
                "withdrawal_fee": "0",
                "deposit_desc": "Ensure to check withdrawal address supports Bitcoin (BTC) chain deposits",
                "withdraw_desc": "Send only Bitcoin (BTC) asset to this deposit address",
                "explorer_address_url": "https://live.blockcypher.com/btc/address/",
                "explorer_tx_url": "https://live.blockcypher.com/btc/tx/",
                "notes": "",
            }
        ],
      "precision": "1e-8",
      "price_to_usd": "21950.0000000000",
      "withdrawal_fee": "0.00000001",
    },
    {
      "asset": "eth",
      "btc_equivalent": "0.069503416856492",
      "icon_url": "https://storage.bitwyre.com/public/images/coins/raster/ETH_500px.png",
      "is_deposit_enabled": true,
      "is_trading_enabled": true,
      "is_withdraw_enabled": true,
      "local_equivalent": "",
      "local_reference": "",
      "market_cap_rank": "2",
      "market_cap_usd": "180000000000",
      "max_withdrawal": "10",
      "min_deposit": "0",
      "min_order_size": "0.0001",
      "min_order_size_increment": "0.0001",
      "min_price_increment_usd": "0.01",
      "min_withdrawal": "0.001",
      "name": "Ethereum",
      "network_list": [
            {
                "network_name": "Ethereum",
                "network_id": "ETH",
                "asset_type": "coin",
                "address_tag": "",
                "token_type": "",
                "address_regex": "^(0x)[0-9A-Fa-f]{40}$",
                "memo_regex": "",
                "is_contains_address_tag": false,
                "is_network_deposit_enabled": true,
                "is_network_withdraw_enabled": true,
                "is_default_network": true,
                "network_confirmations": 12,
                "max_withdrawal": "1000",
                "min_deposit": "1",
                "min_withdrawal": "0",
                "withdrawal_fee": "0",
                "deposit_desc": "Ensure to check withdrawal address supports Ethereum (ETH) chain deposits",
                "withdraw_desc": "Send only Ethereum (ETH) asset to this deposit address",
                "explorer_address_url": "https://etherscan.io/address/",
                "explorer_tx_url": "https://etherscan.io/tx/",
                "notes": "",
            },
            {
                "network_name": "Binance Smart Chain",
                "network_id": "BSC",
                "asset_type": "token",
                "address_tag": "",
                "token_type": "BEP20",
                "address_regex": "^(0x)[0-9A-Fa-f]{40}$",
                "memo_regex": "",
                "is_contains_address_tag": false,
                "is_network_deposit_enabled": true,
                "is_network_withdraw_enabled": true,
                "is_default_network": false,
                "network_confirmations": 12,
                "max_withdrawal": "1000",
                "min_deposit": "1",
                "min_withdrawal": "0",
                "withdrawal_fee": "0",
                "deposit_desc": "Ensure to check withdrawal address supports Ethereum (Binance Smart Chain BEP20) chain deposits",
                "withdraw_desc": "Send only Ethereum (Binance Smart Chain BEP20) to this deposit address",
                "explorer_address_url": "https://bscscan.com/address/",
                "explorer_tx_url": "https://bscscan.com/tx/",
                "notes": "",
            },
            {
                "network_name": "Fantom",
                "network_id": "FTM",
                "asset_type": "token",
                "address_tag": "",
                "token_type": "ERC20",
                "address_regex": "^(0x)[0-9A-Fa-f]{40}$",
                "memo_regex": "",
                "is_contains_address_tag": false,
                "is_network_deposit_enabled": true,
                "is_network_withdraw_enabled": true,
                "is_default_network": false,
                "network_confirmations": 12,
                "max_withdrawal": "1000",
                "min_deposit": "1",
                "min_withdrawal": "0",
                "withdrawal_fee": "0",
                "deposit_desc": "Ensure to check withdrawal address supports Ethereum (Fantom ERC20) chain deposits",
                "withdraw_desc": "Send only Ethereum (Fantom ERC20) to this deposit address",
                "explorer_address_url": "https://ftmscan.com/address/",
                "explorer_tx_url": "https://ftmscan.com/tx/",
                "notes": "",
            },
            {
                "network_name": "Solana",
                "network_id": "SOL",
                "asset_type": "token",
                "address_tag": "",
                "token_type": "SOL",
                "address_regex": "^(0x)[0-9A-Fa-f]{40}$",
                "memo_regex": "",
                "is_contains_address_tag": false,
                "is_network_deposit_enabled": true,
                "is_network_withdraw_enabled": true,
                "is_default_network": false,
                "network_confirmations": 12,
                "max_withdrawal": "1000",
                "min_deposit": "1",
                "min_withdrawal": "0",
                "withdrawal_fee": "0",
                "deposit_desc": "Ensure to check withdrawal address supports Ethereum (Solana SOL) chain deposits",
                "withdraw_desc": "Send only Ethereum (Solana SOL) to this deposit address",
                "explorer_address_url": "https://solscan.io/address/",
                "explorer_tx_url": "https://solscan.io/tx/",
                "notes": "",
            }
        ],
      "precision": "1e-9",
      "price_to_usd": "1525.6000000000",
      "withdrawal_fee": "0.00000001"
    }
  ]
}

Returns an array filled with supported crypto assets.

Endpoint

https://api.bitwyre.com/public/assets/crypto

Request Fields/Parameters

Response Types (JSON Array)

JSON Field Data Type Remark
JSON-array string Returns an an array filled with tradable products

Fiat Assets

Request

curl "https://api.bitwyre.com/public/assets/fiat" -X GET

Response

{
  "error": [],
  "result": [
    {
      "asset": "idr",
      "btc_equivalent": "",
      "icon_url": "https://storage.bitwyre.com/public/images/coins/raster/IDR.png",
      "is_deposit_enabled": true,
      "is_trading_enabled": true,
      "is_withdraw_enabled": true,
      "local_equivalent": "",
      "local_reference": "",
      "max_withdrawal": "100000000",
      "min_withdrawal": "100000",
      "name": "Indonesian Rupiah",
      "precision": "1",
      "withdrawal_fee": "0"
    },
    {
      "asset": "mxn",
      "btc_equivalent": "",
      "icon_url": "https://storage.bitwyre.com/public/images/fiats/raster/mxn.png",
      "is_deposit_enabled": true,
      "is_trading_enabled": true,
      "is_withdraw_enabled": true,
      "local_equivalent": "",
      "local_reference": "",
      "max_withdrawal": "",
      "min_withdrawal": "20000",
      "name": "Mexican Peso",
      "precision": "1e-2",
      "withdrawal_fee": "10000"
    },
    {
      "asset": "brl",
      "btc_equivalent": "",
      "icon_url": "https://storage.bitwyre.com/public/images/fiats/raster/brl.png",
      "is_deposit_enabled": true,
      "is_trading_enabled": true,
      "is_withdraw_enabled": true,
      "local_equivalent": "",
      "local_reference": "",
      "max_withdrawal": "",
      "min_withdrawal": "20000",
      "name": "Brazilian Real",
      "precision": "1e-2",
      "withdrawal_fee": "10000"
    },
    {
      "asset": "usd",
      "btc_equivalent": "",
      "icon_url": "https://storage.bitwyre.com/assets/usd.png",
      "is_deposit_enabled": true,
      "is_trading_enabled": true,
      "is_withdraw_enabled": true,
      "local_equivalent": "",
      "local_reference": "",
      "max_withdrawal": "",
      "min_withdrawal": "20000",
      "name": "United States Dollar",
      "precision": "1e-2",
      "withdrawal_fee": "10000"
    }
  ]
}

Returns an array filled with supported fiat assets.

Endpoint

https://api.bitwyre.com/public/assets/fiat

Request Fields/Parameters

Response Types (JSON Array)

JSON Field Data Type Remark
JSON-array string Returns an an array filled with tradable products

Instruments

Request

curl "https://api.bitwyre.com/public/pairs?market=crypto&product=spot&country=ID" -X GET

Response For Spot Product

{
  "error": [],
  "result": [
    {
      "base_asset": "btc",
      "best_ask": "0",
      "best_bid": "9000.0",
      "change_24hours": "0",
      "forbidden_country": "US",
      "incremental_price": "0.000001",
      "instrument": "btc_usdt_spot",
      "is_halt": false,
      "is_matching_engine_replaying": false,
      "last": "60000",
      "market": "crypto",
      "minimum_order_size": "0.00001",
      "product": "spot",
      "quote_asset": "usdt",
      "size_increment": "0.00001",
      "symbol": "BTC/USDT",
      "volume_base": "0.001",
      "volume_quote": "60"
    },
    {
      "base_asset": "eth",
      "best_ask": "0",
      "best_bid": "1233.0",
      "change_24hours": "0",
      "forbidden_country": "US",
      "incremental_price": "0.000001",
      "instrument": "eth_usdt_spot",
      "is_halt": true,
      "is_matching_engine_replaying": false,
      "last": "0",
      "market": "crypto",
      "minimum_order_size": "0.0001",
      "product": "spot",
      "quote_asset": "usdt",
      "size_increment": "0.000001",
      "symbol": "ETH/USDT",
      "volume_base": "0",
      "volume_quote": "0"
    }
  ]
}

Returns an underscore _ delimited tradable asset pairs array.

A sample response for a futures market in crypto:

Request

curl "https://api.bitwyre.com/public/pairs?market=crypto&product=futures&country=GLOBAL" -X GET

Response

{
  error: [],
  result: [
    { instrument: "btcusdx_200607_futures", symbol: "BTCM20" }, // BTC USD Index, futures contract, settled in USD, delivery on June 7th 2020
    { instrument: "bchusdx_200607_futures", symbol: "BCHM20" }, // BCH USD Index, futures contract, settled in USD, delivery on June 7th 2020
    { instrument: "ethusdx_200607_futures", symbol: "ETHM20" }, // ETH USD Index, futures contract, settled in USD, delivery on June 7th 2020
    { instrument: "ethusdx_perp_futures", symbol: "ETHPERPS" }, // ETH USD Index, perpetual swap futures contracts, USD settled
    { instrument: "btcusdx_perp_futures", symbol: "BTCPERPS" }, // ETH USD Index, perpetual swap futures contracts, USD settled
  ],
}

For long product codes, we are using an _ (underscore) delimited convention to refer our futures and options product: indexname_expiry_producttype.

  1. Underlying financial instrument price. btcusdtx here is the Bitcoin to USD index on Bitwyre's exchange; a weighted average of worldwide Bitcoin spot market index price.
  2. Settlement currency, USD.
  3. Product type, that can only be futures, swap, calloption, putoption, swaptions, swapfutures, spreads.

For short product codes, we are using the Chicago Mercantile Exchange (CME) convention with asset traded, month code and year code concatenated in capital letters.

Month Month Code
January F
February G
March H
April J
May K
June L
July M
August Q
September U
October V
November X
December Z

A sample response for an options market in crypto:

Request

curl "https://api.bitwyre.com/public/pairs?market=crypto&product=options&country=GLOBAL" -X GET

Response

{
  error: [],
  result: [
    { instrument: "btcusdx_200607_10000_calloption", symbol: "BTCM20" }, // BTC USD Index, call options, settled in USD, delivery on June 7th 2020, strike price of 10000 USD
    { instrument: "bchusdx_200607_300_calloption", symbol: "BCHM20" }, // BCH USD Index, call options, settled in USD, delivery on June 7th 2020, strike price of 300 USD
    { instrument: "ethusdx_200607_500_calloption", symbol: "ETHM20" }, // ETH USD Index, call options, settled in USD, delivery on June 7th 2020, strike price of 300 USD
    { instrument: "btcusdx_200607_5000_putoption", symbol: "BTCM20" }, // BTC USD Index, put options, settled in USD, delivery on June 7th 2020, strike price of 5000 USD
    { instrument: "bchusdx_200607_100_putoption", symbol: "BCHM20" }, // BCH USD Index, put options, settled in USD, delivery on June 7th 2020, strike price of 100 USD
    { instrument: "ethusdx_200607_100_putoption", symbol: "ETHM20" }, // ETH USD Index, put options, settled in USD, delivery on June 7th 2020, strike price of 100 USD
    { instrument: "ethusdx_perp_100_putoption", symbol: "ETH100PUTPERPS" }, // ETH USD Index, put options, settled in USD, perpetual/everlasting options, strike price of 100 USD
    { instrument: "ethusdx_perp_1000000_calloption", symbol: "ETH1000000CALLPERPS" }, // ETH USD Index, call options, settled in USD, perpetual/everlasting options, strike price of 1,000,000 USD (one million dollars)
  ],
}

The product btcusdx_200607_10000_calloption means a call contract with delivery on June 7th, 2020, at the strike price of 10,000 of the underlying financial instrument BTCUSDX). bchusdx_200607_2000_calloption0 means a put contract with delivery on June 7th, 2020, at the strike price of 2,000 of the underlying financial instrument BTCUSDX).

Endpoint

https://api.bitwyre.com/public/pairs

Request Fields/Parameters

Query Parameter Data Type Required Remark
"market" string true crypto, equity, stablecoin, fixed_income, commodities or carbon
"product" string true spot, futures, options, swaps, or spreads
"country" string true ISO 3166-2 Country Code. Only ID or PA for now

Response Types (JSON Array)

JSON Field Data Type Remark
JSON-array string base asset, quote asset, product filter, delimited with an _ (underscore).

Ticker

Request

curl "https://api.bitwyre.com/public/ticker?instrument=btc_idr_spot" -X GET

Response

{
  "error": [],
  "result": [
    {
      "instrument": "btc_idr_spot",
      "asset_base": "btc",
      "asset_quote": "idr",
      "high": "126989000",
      "low": "115201000",
      "percent_change": "-2.123",
      "volume_base": "611.66499447",
      "volume_quote": "7434324.9431",
      "last": "124783000",
      "best_bid": "124761000",
      "best_ask": "124777000",
      "timestamp": 1571744594571020435,
      "market": "crypto",
      "is_frozen": false
    },
    {
      "instrument": "btc_usdt_spot",
      "asset_base": "btc",
      "asset_quote": "usdt",
      "high": "126989000",
      "low": "115201000",
      "percent_change": "-2.123",
      "volume_base": "611.66499447",
      "volume_quote": "7434324.9431",
      "last": "124783000",
      "best_bid": "124761000",
      "best_ask": "124777000",
      "timestamp": 1571744594571020435,
      "market": "crypto",
      "is_frozen": false
    }
  ]
}

Returns ticker information for an asset pair.

Endpoint

https://api.bitwyre.com/public/ticker

Request Fields/Parameters

Query Parameter Data Type Required Remark
"instrument" string false base asset, quote asset, product filter, delimited with an _ (underscore).

If the instrument paremeter is empty or omitted, will return the ticker data of all available asset pairs.

Response Types (JSON Object)

JSON Field Data Type Remark
"instrument" string base asset, quote asset, product filter, delimited with an _ (underscore).
"asset_base" string base asset in the trade pair
"asset_quote" string quote asset in the trade pair
"high" float-string highest market price in the last 24 hours
"low" float-string lowest market price in the last 24 hours
"percent_change" float-string market price change percentage in the last 24 hours (up to 8 precision)
"volume_base" float-string total market volume of the base asset in the last 24 hours
"volume_quote" float-string total market volume of the quote asset in the last 24 hours
"last" float-string last market price for the base asset
"best_bid" float-string current highest bid price
"best_ask" float-string current lowest ask price
"timestamp" big-integer unix time in nanoseconds
"market" enum-string equities, crypto, fixed_income, or commodiities
"is_frozen" boolean market frozen status

Trades

Request

curl "https://api.bitwyre.com/public/trades?instrument=btc_usdt_spot&trade_num=2" -X GET

Response

{
  "error": [],
  "result": [
    {
      "instrument": "btc_usd_spot",
      "price": "70000.0",
      "side": 1,
      "timestamp": 1617701262147203562,
      "trade_uuid": "7d0cec66-f130-4fc6-b314-622d394ccec2",
      "value": "4900.0",
      "volume": "0.07"
    },
    {
      "instrument": "btc_usd_spot",
      "price": "70000.0",
      "side": 2,
      "timestamp": 1617701262147203562,
      "trade_uuid": "7d0cec66-f130-4fc6-b314-622d394ccec2",
      "value": "4900.0",
      "volume": "0.07"
    }
  ]
}

Returns last trade_num trades for an asset pair.

Limited to a maximum of 50 last trades.

Endpoint

https://api.bitwyre.com/public/trades

Request Fields/Parameters

Query Parameter Data Type Required Remark
"instrument" string false base asset, quote asset, product filter, delimited with an _ (underscore).
"trade_num" number true last trade_num trades to get
"from_time" int false start timestamp in nanoseconds.
"to_time" int false end timestamp in nanoseconds.

Response Types (Array of JSON Object)

JSON Field Data Type Remark
instrument string base asset, quote asset, product filter, delimited with an _ (underscore).
price float-string price/quote asset of the traded base asset
volume float-string volume of the traded base asset
value float-string quote value (price x volume)
side enum-number trade type ( 1 - buy; 2 - sell )
id uuid-string universal unique id of the trade
timestamp big-integer trade time, unixtime in nanoseconds

Depth

Request

curl "https://api.bitwyre.com/public/depth?instrument=btc_idr_futures&depth_num=2" -X GET

Response

{
  "error": [],
  "result": {
    "bids": [
      ["124112000", "0.18154050"],
      ["124110000", "0.47319750"]
    ],
    "asks": [
      ["124130000", "0.03701609"],
      ["124251000", "0.03223585"]
    ],
    "is_frozen": 0
  }
}

Response For All Instrument

{
  error: [],
  result: {
    asks: {
      btc_usd_spot: [[]],
      btc_idr_spot: [
        ["124112000", "0.18154050"],
        ["124110000", "0.47319750"],
      ],
      // ... other instrument
    },
    bids: {
      btc_usd_spot: [[]],
      btc_idr_spot: [
        ["124130000", "0.03701609"],
        ["124251000", "0.03223585"],
      ],
      // ... other instrument
    },
    is_frozen: 0,
  },
}

Returns depth data for an asset pair.

Limited to a maximum of 150 data points.

Endpoint

https://api.bitwyre.com/public/depth

Request Fields/Parameters

Query Parameter Data Type Required Remark
instrument string false base asset, quote asset, product filter, delimited with an _ (underscore). If instrument empty will fetch all depth from all instrument
depth_num number true depth_num count of data points to get

Response Types (JSON Object)

JSON Field Data Type Remark
bids array-of-float-string-tuple depth_num count of current bid orders in the orderbook
asks array-of-float-string-tuple depth_num count of current ask orders in the orderbook
is_frozen boolean market frozen status

Contract

Request

curl "https://api.bitwyre.com/public/contract?instrument=btcusdtx_usdt_200607F1000000" -X GET

Response

{
  "error": [],
  "result": {
    "instrument": "btcusdtx_usdt_200607F1000000",
    "details": "contract for cash delivery of BTC/USD index settled for July 6th, 2020 for the strike price of 10,000 USD",
    "pricing_source": "CME Bitcoin Real Time Index",
    "bitwyre_index_price": "11500.00",
    "bitwyre_index_price_currency": "USD",
    "24h_volume": "800,000,000.00",
    "24h_volume_currency": "USD",
    "open_interest": "600,000,000.00",
    "interest_rate": "0.001%",
    "contract_value": "1 USD",
    "initial_margin_base_value": "1%",
    "maintenance_margin_base_value": "0.5%"
  }
}

Returns contract details for a derivative instrument/asset pair.

Endpoint

https://api.bitwyre.com/public/contract

Request Fields/Parameters

Query Parameter Data Type Required Remark
instrument string true base asset, quote asset, product filter, delimited with an _ (underscore).

Response Types (JSON Object)

JSON Field Data Type Remark
instrument string base asset, quote asset, product filter, delimited with an _ (underscore).
details string detail of financial contract
pricing_source string source of index pricing
bitwyre_index_price float-string price of index
bitwyre_index_price_currency string currency of price index
24h_volume string 24 hour traded volume of instrument
24h_volume_currency string currency reference for 24 hour traded volume
open_interest string the number of contracts or commitments outstanding in futures and options that are trading on an official exchange at any one time.
interest_rate percentage-string interest rate reference for valuation reference
contract_value string 1 contract value equivalent in USD
initial_margin_base_value string initial margin percentage
maintenance_margin_base_value string maintenance margin percentage

Get Fiat Withdrawal Method

Request

curl "https://api.bitwyre.com/public/withdrawal/fiat/method" -X GET

Response

{
    "error": [],
    "result": [
        {
            "asset": "idr",
            "fee": "0",
            "fee_type": "",
            "is_enabled": true,
            "max_withdrawal": "",
            "merchant_id": "MANDIRI",
            "min_withdrawal": "0",
            "payment_type": "Bank Transfer"
        },
        {
            "asset": "idr",
            "fee": "0",
            "fee_type": "",
            "is_enabled": true,
            "max_withdrawal": "",
            "merchant_id": "BRI",
            "min_withdrawal": "0",
            "payment_type": "Bank Transfer"
        },
        {
            "asset": "idr",
            "fee": "0",
            "fee_type": "",
            "is_enabled": true,
            "max_withdrawal": "",
            "merchant_id": "BNI",
            "min_withdrawal": "0",
            "payment_type": "Bank Transfer"
        }
    ],
}

Get fiat withdrawal method data

Endpoint

https://api.bitwyre.com/public/withdrawal/fiat/method

Request Fields/Parameters

Query Parameter Data Type Required Remark
asset string false Transaction Asset. Default all
payment_type string false Withdrawal Payment Type (ex. Bank Transfer) . Default all
merchant_id string false Withdrawal Merchant ID. Default all

Response Types (JSON Object)

JSON Field Data Type Remark
asset string Transaction Asset
fee string Amount of withdrawal fee
fee_type string Type of fee (if any)
is_enabled boolean true if withdrawal method is enabled
max_withdrawal string Maximum amount of withdrawal for the method
merchant_id string Withdrawal Merchant ID
min_withdrawal string Minimum amount of withdrawal for the method
payment_type string Withdrawal Payment Type

Insider Profiles

Request

curl "https://api.bitwyre.com/public/insider"
-X GET

Response

{
  "error": [],
  "result": [
    {
      "email": "[email protected]",
      "email_verified": 0,
      "has_submitted_kyc": null,
      "insider": 1,
      "institution": 0,
      "is_otp_activated": 0,
      "kyc_level": 0,
      "master_account": 1,
      "master_account_uuid": null,
      "monthly_avg_trading_volumes": null,
      "nationality": "ID",
      "preference_pairs": null,
      "pseudonym": null,
      "reference_asset": null,
      "restricted": 0,
      "sub_account": 0,
      "subaccount_code": "541ebc38-6bef-4d65-aefd-c3575d4e4a21",
      "suspended": 0,
      "user_uuid": "2952e311-cfc9-412e-9ff3-e5cb8131ed45",
      "username": "Insider 1"
    },
    {
      "email": "[email protected]",
      "email_verified": 0,
      "has_submitted_kyc": 1,
      "insider": 1,
      "institution": 0,
      "is_otp_activated": 0,
      "kyc_level": 0,
      "master_account": 1,
      "master_account_uuid": null,
      "monthly_avg_trading_volumes": null,
      "nationality": "ID",
      "preference_pairs": null,
      "pseudonym": null,
      "reference_asset": null,
      "restricted": 1,
      "sub_account": 0,
      "subaccount_code": "55e77e70-bfba-46be-aad1-dc986312da5a",
      "suspended": 0,
      "user_uuid": "04761f29-0288-4fff-97c8-14d58413e720",
      "username": "Insider 2"
    }
  ]
}

Request

curl "https://api.bitwyre.com/public/insider?username=<username>"
-X GET

Response

{
  "error": [],
  "result": {
    "email": "[email protected]",
    "email_verified": 0,
    "has_submitted_kyc": null,
    "insider": 1,
    "institution": 0,
    "is_otp_activated": 0,
    "kyc_level": 0,
    "master_account": 1,
    "master_account_uuid": null,
    "monthly_avg_trading_volumes": null,
    "nationality": "ID",
    "preference_pairs": null,
    "pseudonym": null,
    "reference_asset": null,
    "restricted": 0,
    "sub_account": 0,
    "subaccount_code": "541ebc38-6bef-4d65-aefd-c3575d4e4a21",
    "suspended": 0,
    "user_uuid": "2952e311-cfc9-412e-9ff3-e5cb8131ed45",
    "username": "Insider 1"
  }
}

Returns insider user profiles info

Endpoint

https://api.bitwyre.com/public/insider

Request Fields/Parameters

Query Parameter Data Type Required Remark
username string false Username

Response Types (JSON Object/Arrays)

JSON Field Data Type Remark
email string Insider Email
email_verified boolean 1 if email is already verified
has_submitted_kyc boolean 1 if user is already submitted kyc
insider boolean 1 if user is an insider
institution boolean 1 if user has an institution
is_otp_activated boolean 1 if user is already activated otp
kyc_level integer User KYC Level
master_account boolean 1 if user is a master account
master_account_uuid string User Master Account UUID
monthly_avg_trading_volumes integer User Monthly Average Trading Volumes
nationality string User Nationality
preference_pairs boolean User preference pairs
reference_asset array-of-string User reference asset
restricted boolean User trading status
sub_account boolean 1 if user has a sub account
subaccount_code string User Sub Account User Code
suspended boolean User Status
user_uuid string User UUID
username string Username

Insider Trades

Request

curl "https://api.bitwyre.com/public/insider/trades"
-X GET

Response

{
  "error": [],
  "result": [
    {
      "btc_usdt_spot": [
        {
          "exec_price": 1.21,
          "exec_qty": 10.0,
          "exec_type": 13,
          "exec_value": 12.1,
          "fee_paid": -0.015,
          "fee_paid_asset": "btc",
          "fee_rate": -0.0015,
          "fee_type": 1,
          "notes": null,
          "order_price": 1.21,
          "order_qty": 10.0,
          "order_remaining": 0.0,
          "order_type": 2,
          "side": 1,
          "status": 2,
          "timestamp": 1609027200000000000,
          "username": "Insider 1"
        }
      ],
      "eth_usdt_spot": [
        {
          "exec_price": 1.21,
          "exec_qty": 1.0,
          "exec_type": 13,
          "exec_value": 12.1,
          "fee_paid": 36300.0,
          "fee_paid_asset": "idr",
          "fee_rate": 0.003,
          "fee_type": 2,
          "notes": null,
          "order_price": 1.21,
          "order_qty": 1.0,
          "order_remaining": 0.0,
          "order_type": 2,
          "side": 2,
          "status": 2,
          "timestamp": 1609027200000000000,
          "username": "Insider 2"
        }
      ]
    }
  ]
}

Request

curl "https://api.bitwyre.com/public/insider/trades?username=<username>"
-X GET

Response

{
  "error": [],
  "result": [
    {
      "btc_usdt_spot": [
        {
          "exec_price": 1.21,
          "exec_qty": 10.0,
          "exec_type": 13,
          "exec_value": 12.1,
          "fee_paid": -0.015,
          "fee_paid_asset": "btc",
          "fee_rate": -0.0015,
          "fee_type": 1,
          "notes": null,
          "order_price": 1.21,
          "order_qty": 10.0,
          "order_remaining": 0.0,
          "order_type": 2,
          "side": 1,
          "status": 2,
          "timestamp": 1609027200000000000
        }
      ]
    }
  ]
}

Returns user insider's trades data info

Endpoint

https://api.bitwyre.com/public/insider/trades

Request Fields/Parameters

Query Parameter Data Type Required Remark
username string false Username

Response Types (JSON Arrays)

JSON Field Data Type Remark
exec_price float Order Execution Price
exec_qty float Order Execution Quantity
exec_type integer Order Execution Type
exec_value float Order Execution Value
fee_paid float Order Paid Fees
fee_paid_asset string Asset of Fees
fee_rate float Fees Rate
fee_type integer Type of Fees
notes string Order Notes
order_price float Order Price
order_qty float Order Quantity
order_remaining integer Order Remaining Quantity
order_type enum-number order type
side enum-number trade type ( 1 - buy; 2 - sell)
status enum-number order status
timestamp big-integer unix time in nanoseconds

Announcements

Request

curl "https://api.bitwyre.com/public/announcements" -X GET

Response

{
  "error": [],
  "result": {
    "unixtime": 1571744594571020435,
    "announcement": "halting btc_usdt_spot"
  }
}

Returns announcement with the server's time.

Endpoint

https://api.bitwyre.com/public/announcements

Request Fields/Parameters

Response Types (JSON Object)

JSON Field Data Type Remark
unixtime big-integer unix time in nanoseconds
announcement string announcement

Order Types

Request

curl "https://api.bitwyre.com/public/ordertypes" -X GET

Response

{
  "error": [],
  "result": {
    "1": "Market",
    "2": "Limit",
    "3": "Stop",
    "4": "Stop Limit"
  }
}

Returns enumeration of order types

Endpoint

https://api.bitwyre.com/public/ordertypes

Request Fields/Parameters

Response Types (JSON Object)

JSON Field Data Type Remark
result JSON Enumeration of order types

Supported Languages

Request

curl "https://api.bitwyre.com/public/languages" -X GET

Response

{
  "error": [],
  "result": [
    {
      "iso639-2_code": "eng",
      "language": "English"
    },
    {
      "iso639-2_code": "rus",
      "language": "Russian"
    },
    {
      "iso639-2_code": "hin",
      "language": "Hindi"
    },
    {
      "iso639-2_code": "ind",
      "language": "Bahasa Indonesia"
    },
    {
      "iso639-2_code": "chi",
      "language": "官话"
    },
    {
      "iso639-2_code": "fra",
      "language": "Français"
    },
    {
      "iso639-2_code": "spa",
      "language": "Español"
    },
    {
      "iso639-2_code": "por",
      "language": "Portugais"
    }
  ]
}

Returns pairs of supported languages

Endpoint

https://api.bitwyre.com/public/languages

Request Fields/Parameters

Response Types (JSON Object)

JSON Field Data Type Remark
"result" JSON Pairs of supported languages

Get Search Results

Request

curl 'https://api.bitwyre.com/public/search \
  -X GET

Response

{
    "error": [],
    "result": {
        [
            {"keyword": "btc_usdt_spot", "url": "https://www.bitwyre.com/terminal/btc_usdt_spot"},
            {"keyword": "btc_idr_spot", "url": "https://www.bitwyre.com/terminal/btc_idr_spot"},
        ]
        ....
    }
}

Retrieve search query

Endpoint

https://api.bitwyre.com/public/search

Request Fields/Parameters

None needed yet

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
Nearest neighbor search of words string Closest word
... ... ...

Price Index

An aggregate of an instrument's current market price, collected from multiple third party sources and major exchanges Indices are calculated by fetching orderbook per exchanges, getting their bid-ask spread, then averaging their prices. It is calculated every second by our backend. Current sources are:

  1. Binance
  2. Bitfinex
  3. Bitstamp
  4. Coinbase
  5. Huobi
  6. Okex

Request

curl "https://api.bitwyre.com/public/index?instrument=btc_usdt_spot" -X GET

Response

{
  "error": [],
  "result": {
    "btc_usdt_spot": [
      {
        "price": "400000.0",
        "timestamp": "2021-08-13 04:26:34.086636",
        "timestamp_integer": 1628828794
      },
      {
        "price": "500000.0",
        "timestamp": "2021-08-18 05:08:29.128583",
        "timestamp_integer": 1629263309
      }
    ]
  }
}

Endpoint

https://api.bitwyre.com/public/index

Request Fields/Parameters

Query Parameter Data Type Required Remark
"instrument" string true base asset, quote asset, product filter, delimited with an _ (underscore).
"amount" integer false amount of data to be fetched
"to_time" integer false end time of data to be fetched
"from_time" integer false start time of data to be fetched
"ascending" boolean false true to sort data ascending bytime

Notes:

  1. Example for instruments: btc_usdt_spot, eth_usdc_spot.
  2. If no amount is specified, endpoint will returns only 1 data, depends on whether it is ascending/descending. Current limit is 100 data points per request.
  3. If no to_time is specified, endpoint will fetch the latest data.
  4. If no from_time is specified, endpoint will try to fetch data from earliest possible point given the maximum limit of data per request.
  5. Default for ascending is false (0), ie the data is sorted descending by time, change to 1 to sort ascending

Response Types (JSON Object)

JSON Field Data Type Remark
error list Error messages, if any
result dictionaries contain list of dictionaries of the data, grouped by instrument

and the list of dictionaries for the results

JSON Field Data Type Remark
price string String representation of the price, up to two decimals
timestamp string Human-readable UTC timestamp
timestamp_integer integer UNIX timestamp, in seconds

Search ticker, trades, and depth data in one endpoint

Request

curl "https://api.bitwyre.com/public/search?country=ID" -X GET

Response

{
  "error": [],
  "result": {
    "spot": {
      "crypto": {
        "btc_usdt_spot": {
          "high": "11000",
          "low": "10000",
          "percent_change": "110.0",
          "volume_base": "34",
          "volume_quote": "267346.0",
          "last": "10100",
          "best_bid": "10075",
          "best_ask": "11000",
          "timestamp": 1571747594573320135,
          "last_trade_price": "10000.0",
          "last_trade_side": 1,
          "last_trade_uuid": "752837c7-aec6-41f8-bb07-286f859f2718",
          "last_trade_value": "20000.0",
          "last_trade_volume": "2.0",
          "last_trade_timestamp": 1571747594573320135,
          "bidbook": [["310.0", "5.0"]],
          "askbook": [["400.0", "2.0"]]
        }
      }
    }
  }
}

Endpoint

https://api.bitwyre.com/public/search

Request Fields/Parameters

Query Parameter Data Type Required Remark
"country" string true two-character of country of interest (eg. US, ID, HK)
"instrument" string false Instrument of interest (eg btc_usdt_spot)

Notes: if no instrument is specified, endpoint will return all available instrument

Response Types (JSON Object)

Returns | JSON Field | Data Type | Remark | | ---------- | --------- | -------------------------- | | error | list | Error messages, if any | | result | dictionaries | contain list of dictionaries of the data, grouped by product, market, instrument |

Please check ticker, trades, and depth endpoint documentation for explanation of the dictionary members

Matching Engine Order Lag

Request

curl "https://api.bitwyre.com/public/orderlag?instrument=<instrument>"
-X GET

Response

{
  "error": [],
  "result": {
    "btc_usdt_spot": "1",
    "eth_usdt_spot": "0"
  }
}

Return order lag of matching engine per instrument (in events)

Endpoint

https://api.bitwyre.com/public/orderlag

Request Fields/Parameters

Parameter Data Type Required Remark
instrument string false Instrument of interest (eg btc_usdt_spot)

Notes: if no instrument is specified, endpoint will return all available instrument

Response Types (JSON Object)

JSON Field Data Type Remark
instrument string amount of order event lag

Please check ticker, trades, and depth endpoint documentation for explanation of the dictionary members

Matching Engine Throughput

Request

curl "https://api.bitwyre.com/public/throughput?instrument=<instrument>"
-X GET

Response

{
  "error": [],
  "result": {
    "Consumer": [
      {
        "instrument": "btc_usdt_spot",
        "lag": "22", 
        "max_lag": "2000",
        "throughput": "1000 msg/s"
      },
      {
        "instrument": "eth_usdt_spot",
        "lag": "0", 
        "max_lag": "2000",
        "throughput": "500 msg/s"
      }
    ],
    "CreditRiskAccountManagement": [
      {
        "lag": "11", 
      },
    ],
    "Matching": [
      {
        "instrument": "btc_usdt_spot",
        "lag": "983", 
        "max_lag": "2000",
        "throughput": "1000 msg/s"
      },
      {
        "instrument": "eth_usdt_spot",
        "lag": "1", 
        "max_lag": "2000",
        "throughput": "500 msg/s"
      }
    ],
    "Producer": [
      {
        "instrument": "btc_usdt_spot",
        "lag": "154", 
        "max_lag": "2000",
        "throughput": "500 msg/s"
      },
      {
        "instrument": "eth_usdt_spot",
        "lag": "0", 
        "max_lag": "2000",
        "throughput": "1000 msg/s"
      }
    ]
  }
}

Return throughput rate data of matching engine of the instrument (in events/second), in addition of consumer and max lag data of the instrument.

Endpoint

https://api.bitwyre.com/public/throughput

Request Fields/Parameters

Parameter Data Type Required Remark
instrument string false Instrument of interest (eg btc_usdt_spot)

Notes: if no instrument is specified, endpoint will return all available instrument if no type is specified, endpoint will return all available type

Response Types (JSON Object)

JSON Field Data Type Remark
Consumer array-of-objects consumer matching engine throughput rate of the instrument
Matching array-of-objects mathcing engine throughput rate of the instrument
Producer array-of-objects producer matching engine throughput rate of the instrument

OTC

Request

curl "https://api.bitwyre.com/public/otc?base_asset=<base_asset>&quote_asset=<quote_asset>&spread=<spread>"
-X GET

Response

{
    "error": [],
    "result": {
        "ask_price": 59816.143336500005,
        "bid_price": 19938.7144455
    }
}

Return Ask Price and Bid Price real time.

Endpoint

https://api.bitwyre.com/public/otc?base_asset=btc&quote_asset=usd&spread=1.0

Request Fields/Parameters

Parameter Data Type Required Remark
base_asset string true Base Asset (eg btc)
quote_asset string true Quote Asset (eg usd)
spread float true Spread parameter (eg 1.0)

Response Types (JSON Object)

JSON Field Data Type Remark
ask_price float Value of Ask Price (eg 59816.143336500005)
bid_price float Value of Bid Price (eg 19938.7144455)

Get Convert Rate

Request

curl "https://api.bitwyre.com/public/convert?from_coin=btc&to_coin=usdt&size=2&convert_uuid={convert_uuid}"
-X GET

Response

{
    "error": [],
    "result": {
        "amount": "60000",
        "convert_price": "30000",
        "size": "2",
        "volatility": "1.54",
    }
}

Return Ask Price and Bid Price real time.

Endpoint

https://api.bitwyre.com/public/convert

Request Fields/Parameters

Parameter Data Type Required Remark
from_coin string true Asset that will be converted from
to_coin string true Asset that will be converted to
size string true Convert amount (used only if value is empty)
value string true Convert value (used only if size is empty)
convert_uuid string true Convert UUID

Response Types (JSON Object)

JSON Field Data Type Remark
convert_price string Asset conversion price rate
amount string Calculated amount of asset that will be received
volatility string Price volatility

Spot Product API Endpoints

Getting Spot Account Balance

Request

curl "https://api.bitwyre.com/private/rust/account/spotbalance?nonce=1730953397255336684&checksum=<payload_checksum>&payload={"type": "all", "page": 1, "per_page": 10, "usd_limit": 0.00} \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "total_usd": "75179375442.74",
    "total_idr": 1186239873055522,
    "total_idr_str": "1186239873055522.8478570819961",
    "data": [
      {
        "asset": "btc",
        "available_balance": 999999.9927558,
        "available_balance_str": "999999.9927558",
        "btc_equivalent": 999693.8933955025,
        "constant_multiplier": 100000000,
        "icon_url": "https://robin.bitwyre.id/app/Raster/BTC_125px.png",
        "is_deposit_enabled": true,
        "is_trading_enabled": true,
        "is_usd_stablecoin": false,
        "is_withdraw_enabled": true,
        "local_equivalent": "",
        "local_reference": 0,
        "locked_balance": 0.01,
        "locked_balance_str": "0.01",
        "max_withdrawal": "100",
        "min_withdrawal": "0.0006",
        "name": "Bitcoin",
        "precision": "1.00E-08",
        "total_balance": 1000000.0027558,
        "total_balance_str": "1000000.0027558",
        "type": "crypto",
        "usd_equivalent": 75115999455.84,
        "idr_equivalent": 1185239876413885.2,
        "withdrawal_fee": "0.0003"
      },
      {
        "asset": "idr",
        "available_balance": 999996637487.8,
        "available_balance_str": "999996637487.80",
        "btc_equivalent": 842.6311666328947,
        "constant_multiplier": 100,
        "icon_url": "https://robin.bitwyre.id/app/Raster/ID_150px.png",
        "is_deposit_enabled": true,
        "is_trading_enabled": true,
        "is_usd_stablecoin": false,
        "is_withdraw_enabled": true,
        "local_equivalent": "",
        "local_reference": 0,
        "locked_balance": 273867.18,
        "locked_balance_str": "273867.18",
        "max_withdrawal": "100000000",
        "min_withdrawal": "0",
        "name": "Indonesian Rupiah",
        "precision": "1.00E-02",
        "total_balance": 999996911354.98,
        "total_balance_str": "999996911354.98",
        "type": "fiat",
        "usd_equivalent": 63375986.9,
        "idr_equivalent": 999996637487.8,
        "withdrawal_fee": "0"
      },
    // ... and all other asset balances
    ]
  },
  "meta": {
    "has_next": true,
    "has_prev": false,
    "next_page": 2,
    "page": 1,
    "pages": 8,
    "prev_page": null,
    "total_count": 16
  }
}

Retrieve all user's fiat and crypto balance.

Endpoint

https://api.bitwyre.com/private/rust/account/spotbalance

Request Fields/Parameters

Because this is a GET endpoint, nonce, checksum and payload are query parameters.

Please refer to Authentication.

The payload is a json object with these fields:

Fields Value Required Description
page int false Page number
per_page int false Number result to show. Default 50 result per page
use_pagination bool false Default is 1. To turn off the pagination set use_pagination=0
asset str false Eg. asset=btc to retrieve only btc balance
type str false crypto or fiat to retrieve balance by type, use all to retrieve all balances

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
total_usd string total asset balance equivalent in USD
total_idr integer total asset balance equivalent in IDR
total_idr_str string total asset balance equivalent in IDR in string
data array array of json objects
asset string asset
available_balance float available asset balance
available_balance_str string available asset balance in string format
constant_multiplier integer asset constant multiplier
icon_url string asset icon image url
is_deposit_enabled bool true if asset deposit is enabled
is_trading_enabled bool true if asset trade is enabled
is_withdraw_enabled bool true if asset withdraw is enabled
btc_equivalent float balance in bitcoin
local_equivalent string balance in local reference
local_reference integer local reference asset
locked_balance float amount of locked balance
locked_balance_str string amount of locked balance in string format
max_withdrawal string maximum amount of withdrawal
min_withdrawal string minimum amount of withdrawal
name string name of asset
precision string precision of asset
total_balance float amount of total balance
total_balance_str string amount of total balance in string format
type string type of asset (crypto/fiat)
usd_equivalent float asset equivalent in USD
idr_equivalent float asset equivalent in IDR
withdrawal_fee string asset withdrawal fees
is_usd_stablecoin false true if asset is usd stablecoin

Moving Spot Account Balance to Derivatives Account Balance

Request

curl "https://api.bitwyre.com/private/account/spotbalance?nonce=17081945&checksum=<payload_checksum>&payload=" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X POST

Response

{
  "error": [],
  "result": [
    {
      "asset": "btc",
      "amount": 100,
      "to_derivatives": true,
      "to_spot": false,
      "success": true
    },
    {
      "asset": "usdt",
      "amount": 100,
      "to_derivatives": true,
      "to_spot": false,
      "success": true
    }
  ]
}

Move a user's fiat and crypto balance for derivatives trading.

Endpoint

https://api.bitwyre.com/private/account/spotbalance

Request Fields/Parameters

JSON Field Value Required Description
asset string true the asset to be moved from the spot balance to the derivatives account balance
amount integer true the amount of the asset to be moved from the spot balance to the derivatives account balance (in the currency's normal unit e.g bitcoin, ether)

Please refer to Authentication.

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
asset string name of asset
amount integer asset amount moved
to_derivatives boolean if the direction is spot -> derivatives
to_spot boolean if the direction is derivatives -> spot
success boolean if the move operation is a success

Getting Account Statement

Request

curl "https://api.bitwyre.com/private/account/statement?nonce=17081945&checksum=<payload_checksum>&asset=idr&payload={\"assets\": [\"btc\", \"idr\"]}&page=1&per_page=5" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "deposit": {
      "brl": [],
      "btc": [
        {
          "fee": 5e-5,
          "gross_amount": 0.01,
          "id": 4,
          "nett_amount": 0.00995,
          "network_confirmation": 0,
          "provider": "duitku",
          "status": "pending",
          "submit_time": 1571747594573320135,
          "success_time": 0,
          "transaction_id": "26a13a32-2e11-472a-84cc-242d765a88dg",
          "tx_id": "26a13a32-2e11-472a-84cc-242d765a88dg",
          "type": "crypto"
        }
      ],
      "eth": [],
      "idr": [
        {
          "centralized_confirmation": 0,
          "fee": 1000.0,
          "gross_amount": 5000.0,
          "id": 5,
          "nett_amount": 4000.0,
          "provider": "duitku",
          "status": "pending",
          "submit_time": 1571747594573320135,
          "success_time": 0,
          "transaction_id": "26a13a32-2e11-472a-84cc-242d765a88dg",
          "type": "fiat"
        }
      ],
      "mxn": [],
      "usd": [],
      "usdt": [],
      "xmr": [],
      "zec": []
    },
    "withdrawal": {
      "brl": [],
      "btc": [
        {
          "fee": 5e-5,
          "gross_amount": 0.01,
          "id": 6,
          "nett_amount": 0.00995,
          "network_confirmation": 0,
          "provider": "duitku",
          "status": "pending",
          "submit_time": 1571747594573320135,
          "success_time": 0,
          "transaction_id": "26a13a32-2e11-472a-84cc-242d765a88dj",
          "tx_id": "26a13a32-2e11-472a-84cc-242d765a88dj",
          "type": "crypto"
        }
      ],
      "eth": [],
      "idr": [
        {
          "centralized_confirmation": 0,
          "fee": 1000.0,
          "gross_amount": 10000.0,
          "id": 1,
          "nett_amount": 9000.0,
          "provider": "duitku",
          "status": "pending",
          "submit_time": 1571747594573320135,
          "success_time": 0,
          "transaction_id": "26a13a32-2e11-472a-84cc-242d765a88de",
          "type": "fiat"
        },
        {
          "centralized_confirmation": 0,
          "fee": 1000.0,
          "gross_amount": 5000.0,
          "id": 3,
          "nett_amount": 4000.0,
          "provider": "duitku",
          "status": "pending",
          "submit_time": 1571747594573320135,
          "success_time": 0,
          "transaction_id": "26a13a32-2e11-472a-84cc-242d765a88df",
          "type": "fiat"
        }
      ],
      "mxn": [],
      "usd": [],
      "usdt": [],
      "xmr": [],
      "zec": []
    }
  },
  "meta": {
    "has_next": false,
    "has_prev": false,
    "next_page": 2,
    "page": 1,
    "pages": 1,
    "prev_page": null,
    "total_count": 6
  }
}

Retrieve user's withdraw and deposit history.

Endpoint

https://api.bitwyre.com/private/account/statement

Request Fields/Parameters

Because this is a GET endpoint, nonce & checksum are query parameters, also payload should be always an empty string. The SHA256 steps for this endpoint's payload:

  1. jsonify an empty string.
  2. then SHA256 from above result.

Please refer to Authentication.

Parameter Value Required Description
page int false Page number
per_page int false Number result to show. Default 50 result per page

Request Payload Fields

When no payload specified, it will return all statements

Payload Fields Value Required Description
assets list false list of assets for the statements

Please refer to Authentication.

Response Base Structure

JSON Field Data Type Remark
withdrawal asset-statement-object historical withdrawal data for specific asset (array).
deposit asset-statement-object historical deposit data for specific asset (array).

Getting User Withdrawal Fees

Request (All Instruments)

curl "https://api.bitwyre.com/private/account/fees/withdrawal?nonce=17081945&checksum=<payload_checksum>&payload={\"asset\":\"all\"}" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response (All Instruments)

{
  "error": [],
  "result": {
    "btc": {
      "global_fee": "0.0001",
      "user_fee": "0.0001"
    },
    "eth": {
      "global_fee": "0.001",
      "user_fee": "0.001"
    }
  }
}

Request (One Instrument)

curl "https://api.bitwyre.com/private/account/fees/withdrawal?nonce=17081945&checksum=<payload_checksum>&payload={\"asset\":\"btc\"}" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response (One Instrument)

{
  "error": [],
  "result": {
    "btc": {
      "global_withdrawal_fee": "0.0001",
      "user_withdrawal_fee": "0.0001"
    }
  }
}

Retrieve user's withdraw fees.

Endpoint

https://api.bitwyre.com/private/account/fees/withdrawal

Request Payload Fields

When no payload specified, it will return all statements

Payload Fields Value Required Description
asset string true Crypto asset, e.g btc, eth.

Please refer to Authentication.

Response Base Structure

Dictionary of asset and it's withdrawal fees data, withdrawal fees fields:

JSON Field Data Type Remark
global_withdrawal_fee string withdrawal fees data for specific asset
user_withdrawal_fee string withdrawal fees data for specific user

Getting Transaction Histories

Request

curl `https://api.bitwyre.com/private/account/transactions?nonce=17081945&checksum=<payload_checksum>&type=all&asset=all&page=1&per_page=50` \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "deposit": {
      "idr": [
        {
          "account_balance_id": 1,
          "address": "thisisaddress",
          "amount": "100000000.0",
          "asset": "idr",
          "fee": "0.0",
          "final_balance": "1100000000.0",
          "notes": "",
          "status": "Cancelled",
          "time": 1618206392203845000,
          "type": 1
        }
      ],
      "btc": [
        {
          "account_balance_id": 2,
          "address": "thisisaddress",
          "amount": "1.0",
          "asset": "btc",
          "fee": "0.0",
          "final_balance": "10.0",
          "notes": "",
          "status": "Cancelled",
          "time": 1618206125002066000,
          "type": 1
        }
      ]
      // ... other coins
    },
    "withdrawal": {
      "btc": [
        {
          "account_balance_id": 4,
          "address": "thisisaddress",
          "amount": "-1.0",
          "asset": "btc",
          "fee": "0.0",
          "final_balance": "9.0",
          "notes": "",
          "status": "Pending",
          "time": 1617974544507879000,
          "type": 2
        }
      ],
      "idr": [
        {
          "account_balance_id": 3,
          "address": "thisisaddress",
          "amount": "-1000.0",
          "asset": "idr",
          "fee": "0.0",
          "final_balance": "1099999000.0",
          "notes": "",
          "status": "Pending",
          "time": 1618207558627212000,
          "type": 2
        }
      ]
      // ... other coins
    },
    "clearing": {
      "idr": [
        {
          "account_balance_id": 5,
          "address": "thisisaddress",
          "amount": "-1000.0",
          "asset": "BTC IDR spot clearing",
          "fee": "0.0",
          "final_balance": "1099999000.0",
          "notes": "",
          "status": "Pending",
          "time": 1618207558627212000,
          "type": 3
        }
      ],
      "btc": [
        {
          "account_balance_id": 3,
          "address": "thisisaddress",
          "amount": "-1000.0",
          "asset": "BTC IDR spot clearing",
          "fee": "0.0",
          "final_balance": "1099999000.0",
          "notes": "",
          "status": "Pending",
          "time": 1618207558627212000,
          "type": 3
        }
      ]
      // ... other coin clearing
    }
  },
  "meta": {
    "has_next": false,
    "has_prev": false,
    "next_page": 2,
    "page": 1,
    "pages": 1,
    "prev_page": null,
    "total_count": 6
  }
}

Retrieve user's withdraw, deposit, and clearing history.

Endpoint

https://api.bitwyre.com/private/account/transactions

Request Fields/Parameters

Parameter Value Required Description
type string false Type of transaciton (all, deposit, withdrawal, clearing). Default all
asset string false Supported crypto/fiat asset. Default all
page int false Page number
per_page int false Number result to show. Default 50 result per page

Please refer to Authentication.

Response Base Structure

JSON Field Data Type Remark
withdrawal asset-statement-object historical withdrawal data for specific asset (array).
deposit asset-statement-object historical deposit data for specific asset (array).
clearing asset-statement-object historical clearging data for specific asset (array).

Getting Order Quantity Percentage

Example

curl "https://api.bitwyre.com/private/orders/qty-percentage?order_type=2&order_side=1&price=20000&instrument=btc_usdt_spot" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X GET

Response

{
  "error": [],
  "result": {
    "1%": "0.00002",
    "2%": "0.00005",
    "3%": "0.00008",
    "4%": "0.00010",
    "5%": "0.00012",
    "6%": "0.00015",
    "7%": "0.00018",
    "8%": "0.00020",
    "9%": "0.00022",
    "10%": "0.00025",
    "11%": "0.00028",
    "12%": "0.00030",
    "13%": "0.00032",
    "14%": "0.00035",
    "15%": "0.00038",
    "16%": "0.00040",
    "17%": "0.00042",
    "18%": "0.00045",
    "19%": "0.00048",
    "20%": "0.00050",
    "21%": "0.00052",
    "22%": "0.00055",
    "23%": "0.00058",
    "24%": "0.00060",
    "25%": "0.00062",
    "26%": "0.00065",
    "27%": "0.00068",
    "28%": "0.00070",
    "29%": "0.00072",
    "30%": "0.00075",
    "31%": "0.00078",
    "32%": "0.00080",
    "33%": "0.00082",
    "34%": "0.00085",
    "35%": "0.00088",
    "36%": "0.00090",
    "37%": "0.00092",
    "38%": "0.00095",
    "39%": "0.00098",
    "40%": "0.00100",
    "41%": "0.00102",
    "42%": "0.00105",
    "43%": "0.00108",
    "44%": "0.00110",
    "45%": "0.00112",
    "46%": "0.00115",
    "47%": "0.00118",
    "48%": "0.00120",
    "49%": "0.00122",
    "50%": "0.00125",
    "51%": "0.00128",
    "52%": "0.00130",
    "53%": "0.00132",
    "54%": "0.00135",
    "55%": "0.00138",
    "56%": "0.00140",
    "57%": "0.00142",
    "58%": "0.00145",
    "59%": "0.00148",
    "60%": "0.00150",
    "61%": "0.00152",
    "62%": "0.00155",
    "63%": "0.00158",
    "64%": "0.00160",
    "65%": "0.00162",
    "66%": "0.00165",
    "67%": "0.00168",
    "68%": "0.00170",
    "69%": "0.00172",
    "70%": "0.00175",
    "71%": "0.00178",
    "72%": "0.00180",
    "73%": "0.00182",
    "74%": "0.00185",
    "75%": "0.00188",
    "76%": "0.00190",
    "77%": "0.00192",
    "78%": "0.00195",
    "79%": "0.00198",
    "80%": "0.00200",
    "81%": "0.00202",
    "82%": "0.00205",
    "83%": "0.00208",
    "84%": "0.00210",
    "85%": "0.00212",
    "86%": "0.00215",
    "87%": "0.00218",
    "88%": "0.00220",
    "89%": "0.00222",
    "90%": "0.00225",
    "91%": "0.00228",
    "92%": "0.00230",
    "93%": "0.00232",
    "94%": "0.00235",
    "95%": "0.00238",
    "96%": "0.00240",
    "97%": "0.00242",
    "98%": "0.00245",
    "99%": "0.00248",
    "100%": "0.00250"
  },
}

Retrieve user's possible order amount/quantity from 1-100% based on price, order type and order side

Endpoint

https://api.bitwyre.com/private/orders/qty-percentage

Request Fields/Parameters

Parameter Value Required Description
order_type int true Order's Type. See Order Type
order_side int true Order's Side. See Order Size
instrument str true base asset, quote asset, product filter, delimited with an _ (underscore).
price str false Order's Price. Not required for Market-type orders

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
n-percentage string Order Quantity Amount at n%

Opening a New Order

Example: New Market Order

curl "https://api.bitwyre.com/private/rust/order" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
          \"instrument\": \"btc_usdt_spot\",\
          \"side\": 2,\
          \"ordtype\": 1,\
          \"orderqty\": \"2.9301\",\
        }\
      }"

Response (Execution Report)

{
  "error": [],
  "result": {
    "AvgPx": "0",
    "LastLiquidityInd": "0",
    "LastPx": "0",
    "LastQty": "0",
    "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
    "cancelondisconnect": 0,
    "clorderid": "",
    "cumqty": "0",
    "execid": "",
    "exectype": 0,
    "expiry": 0,
    "fill_price": "0",
    "instrument": "btc_usdt_spot",
    "leavesqty": "2.9301",
    "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "orderqty": "2.9301",
    "ordrejreason": "",
    "ordstatus": 0,
    "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "ordtype": 1,
    "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "price": "10.0",
    "side": 2,
    "stoppx": "0",
    "time_in_force": 0,
    "timestamp": 123123132123,
    "transacttime": 0,
    "value": "100.0"
  }
}

Example: New Limit Order

curl "https://api.bitwyre.com/private/rust/order" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
          \"instrument\": \"btc_usdt_spot\",\
          \"side\": 1,\
          \"ordtype\": 2,\
          \"price\": \"9800.5\",\
          \"orderqty\": \"2.9301\",\
        }\
      }"

Response (Execution Report)

{
  "error": [],
  "result": {
    "AvgPx": "0",
    "LastLiquidityInd": "0",
    "LastPx": "0",
    "LastQty": "0",
    "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
    "cancelondisconnect": 0,
    "clorderid": "",
    "cumqty": "0",
    "execid": "",
    "exectype": 0,
    "expiry": 0,
    "fill_price": "0",
    "instrument": "btc_usdt_spot",
    "leavesqty": "2.9301",
    "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "orderqty": "2.9301",
    "ordrejreason": "",
    "ordstatus": 0,
    "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "ordtype": 2,
    "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "price": "9800.5",
    "side": 1,
    "stoppx": "0",
    "time_in_force": 0,
    "timestamp": 123123132123,
    "transacttime": 0,
    "value": "100.0"
  }
}

Example: New Stop Order

curl "https://api.bitwyre.com/private/rust/order" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
          \"instrument\": \"btc_usdt_spot\",\
          \"side\": 2,\
          \"ordtype\": 3,\
          \"stoppx\": \"9850.35\",\
          \"orderqty\": \"2.9301\",\
        }\
      }"

Response (Execution Report)

{
  "error": [],
  "result": {
    "AvgPx": "0",
    "LastLiquidityInd": "0",
    "LastPx": "0",
    "LastQty": "0",
    "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
    "cancelondisconnect": 0,
    "clorderid": "",
    "cumqty": "0",
    "execid": "",
    "exectype": 0,
    "expiry": 0,
    "fill_price": "0",
    "instrument": "btc_usdt_spot",
    "leavesqty": "2.9301",
    "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "orderqty": "2.9301",
    "ordrejreason": "",
    "ordstatus": 0,
    "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "ordtype": 3,
    "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "price": "0",
    "side": 2,
    "stoppx": "9850.35",
    "time_in_force": 0,
    "timestamp": 123123132123,
    "transacttime": 0,
    "value": "100.0"
  }
}

Example: New Stop-Limit Order

curl "https://api.bitwyre.com/private/rust/order" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
          \"instrument\": \"btc_usdt_spot\",\
          \"side\": 1,\
          \"ordtype\": 4,\
          \"price\": \"9800.5\",\
          \"stoppx\": \"9750\",\
          \"orderqty\": \"2.9301\",\
        }\
      }"

Response (Execution Report)

{
  "error": [],
  "result": {
    "AvgPx": "0",
    "LastLiquidityInd": "0",
    "LastPx": "0",
    "LastQty": "0",
    "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
    "cancelondisconnect": 0,
    "clorderid": "",
    "cumqty": "0",
    "execid": "",
    "exectype": 0,
    "expiry": 0,
    "fill_price": "0",
    "instrument": "btc_usdt_spot",
    "leavesqty": "2.9301",
    "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "orderqty": "2.9301",
    "ordrejreason": "",
    "ordstatus": 0,
    "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "ordtype": 4,
    "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "price": "9800.5",
    "side": 1,
    "stoppx": "9750",
    "time_in_force": 0,
    "timestamp": 123123132123,
    "transacttime": 0,
    "value": "100.0"
  }
}

Create a new buy/sell order

Endpoint

https://api.bitwyre.com/private/rust/order

Create Order Payload

JSON Field Value Required Description
clordid uuid-string false client generated uuid string, no mandatory.
instrument string true base asset, quote asset, product filter, delimited with an _ (underscore).
side enum-number true side of order, currently only supports buy (1) or sell (2).
ordtype enum-number true Supports market (1), limit (2), stop (3), or stop_limit (4) order, post only (19), market IOC (20), limit IOC (21), and FOK (22)
price float-string false mandatory for limit and stop_limit order, for market order (using websocket) just provide the price with any number.
stoppx float-string false mandatory for stop and stop_limit order.
orderqty float-string true order quantity for the base asset.
timeinforce enum-number false order lifetime enforcement, see Time In Force.
expiretime big-integer false mandatory when "timeinforce" is set to gtd, unix time in nanoseconds.
execinst string false not-yet-supported, reserved for future.
cancelondisconnect bool false cancel order on disconnection, not supported in REST (yet).

One must make sure that price, quantity and also value are in the the currency unit that are from the base and quote pairs. For example if the instrument is btc_usdt_spot, the quantity is btc and the price and value are in usdt. Note that our clearing engine does clearing inside our database based on 64-bit integer computations. Thus, to reduce the amount of increment errors, we also highly suggest you to compute the quantity in the smallest unit of the base asset and the value in the smallest unit of the quote asset. For the previous example of btc_usdt_spot the smallest unit of btc is satoshi, 10^-8 of a btc, and for usdt it is 10^-6 of a usdt. For a quantity of 1 btc we will process in our backend in the integer 100,000,000and for1 usdtit will be1,000,000`. This is the same for Monero (piconero) and ZCash (zatoshi), the exception is only for Ethereum, where we use GWei in our backend computations.

Getting Open Orders

Request

Getting specific open orders
curl 'https://api.bitwyre.com/private/rust/order/open?payload={"instrument": "btc_usdt_spot"}' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "btc_usdt_spot": [
      {
        "AvgPx": "0",
        "LastLiquidityInd": "0",
        "LastPx": "0",
        "LastQty": "0",
        "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
        "cancelondisconnect": 0,
        "clorderid": "",
        "cumqty": "0",
        "execid": "",
        "exectype": 1,
        "expiry": 0,
        "fill_price": "0",
        "instrument": "btc_usdt_spot",
        "leavesqty": "1",
        "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "orderqty": "1",
        "ordrejreason": "",
        "ordstatus": 0,
        "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "ordtype": 1,
        "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "price": "10.0",
        "side": 1,
        "stoppx": "0",
        "time_in_force": 0,
        "timestamp": 123123132123,
        "transacttime": 0,
        "value": "100.0"
      }
    ]
  },
  "meta": {
    "has_next": true,
    "has_prev": false,
    "next_page": 2,
    "page": 1,
    "pages": 5,
    "prev_page": null,
    "total_count": 5
  }
}

Retrieves curent open orders.

Endpoint

https://api.bitwyre.com/private/orders/open

Request Payload Fields

To return all orders symbols that currently in open position, simply put all as the value of the instrument field below.

Payload Fields Value Required Description
instrument string false base asset, quote asset, product filter, delimited with an _ (underscore).
from_time int false nanosecond timestamp for oldest order to be enumerated.
to_time int false nanosecond timestamp for newest order to be enumerated.
page int false Page number
per_page int false Number result to show. Default 50 result per page

Request Parameters

See REST Private API Data.

Response Data

A dictionary, where the keys are the symbols and the values are an array of currently open order(s), see Execution report Response.

Getting Closed Orders

Request

Getting specific closed order
curl 'https://api.bitwyre.com/private/orders/closed?nonce=17081945&checksum=<payload_checksum>&payload={"instrument":"btc_usdt_spot", "from_time": 1593487780108470000, "to_time": 1593487786824088000}?page=1&per_page=5' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET
Getting all closed order
curl 'https://api.bitwyre.com/private/orders/closed/all?nonce=17081945&checksum=<payload_checksum>&page=1&per_page=3' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "btc_idr_spot": [
      {
        "AvgPx": "0",
        "LastLiquidityInd": "0",
        "LastPx": "0",
        "LastQty": "0",
        "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
        "cancelondisconnect": 0,
        "clorderid": "",
        "cumqty": "0",
        "execid": "",
        "exectype": 1,
        "expiry": 0,
        "fill_price": "0",
        "instrument": "btc_idr_spot",
        "leavesqty": "1",
        "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "orderqty": "1",
        "ordrejreason": "",
        "ordstatus": 1,
        "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "ordtype": 1,
        "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "price": "10.0",
        "side": 1,
        "stoppx": "0",
        "time_in_force": 0,
        "timestamp": 123123132123,
        "transacttime": 0,
        "value": "100.0"
      },
      {
        "AvgPx": "0",
        "LastLiquidityInd": "0",
        "LastPx": "0",
        "LastQty": "0",
        "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
        "cancelondisconnect": 0,
        "clorderid": "",
        "cumqty": "0",
        "execid": "",
        "exectype": 1,
        "expiry": 0,
        "fill_price": "0",
        "instrument": "btc_idr_spot",
        "leavesqty": "1",
        "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc1",
        "orderqty": "1",
        "ordrejreason": "",
        "ordstatus": 1,
        "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc1",
        "ordtype": 1,
        "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc1",
        "price": "10.0",
        "side": 1,
        "stoppx": "0",
        "time_in_force": 0,
        "timestamp": 2345676543246,
        "transacttime": 0,
        "value": "100.0"
      }
    ],
    "btc_usd_spot": [
      {
        "AvgPx": "0",
        "LastLiquidityInd": "0",
        "LastPx": "0",
        "LastQty": "0",
        "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
        "cancelondisconnect": 0,
        "clorderid": "",
        "cumqty": "0",
        "execid": "",
        "exectype": 1,
        "expiry": 0,
        "fill_price": "0",
        "instrument": "btc_usd_spot",
        "leavesqty": "1",
        "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "orderqty": "1",
        "ordrejreason": "",
        "ordstatus": 1,
        "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "ordtype": 1,
        "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "price": "0.1",
        "side": 1,
        "stoppx": "0",
        "time_in_force": 0,
        "timestamp": 123123132123,
        "transacttime": 0,
        "value": "1.0"
      }
    ]
  },
  "meta": {
    "has_next": true,
    "has_prev": true,
    "next_page": 2,
    "page": 1,
    "pages": 5,
    "prev_page": null,
    "total_count": 15
  }
}

Retrieves currently closed orders. Similar to order history.

Endpoint

https://api.bitwyre.com/private/orders/closed https://api.bitwyre.com/private/orders/closed/all

Request Payload Fields

For showing closed order based on parameters on /closed. Otherwise on /closed/all it automatically returns all closed order, no payload necessary

Payload Fields Value Required Description
instrument string false base asset, quote asset, product filter, delimited with an _ (underscore).
from_time int false nanosecond timestamp for oldest order to be enumerated.
to_time int false nanosecond timestamp for newest order to be enumerated.

Request Parameters

Parameter Value Required Description
page int false Page number
per_page int false Number result to show. Default 50 result per page

Response Data

A dictionary, where the keys are the symbols and the values are an array of currently closed order(s), see Execution report Response.

Getting All Cancelled Orders

Request

curl 'https://api.bitwyre.com/private/orders/cancelled?nonce=17081945&checksum=<payload_checksum>&payload=' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "btc_idr_spot": [
      {
        "AvgPx": "0",
        "LastLiquidityInd": "0",
        "LastPx": "0",
        "LastQty": "0",
        "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
        "cancelondisconnect": 0,
        "clorderid": "",
        "cumqty": "0",
        "execid": "",
        "exectype": 1,
        "expiry": 0,
        "fill_price": "0",
        "instrument": "btc_idr_spot",
        "leavesqty": "10",
        "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "orderqty": "10",
        "ordrejreason": "",
        "ordstatus": 4,
        "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "ordtype": 1,
        "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "price": "10.0",
        "side": 1,
        "stoppx": "0",
        "time_in_force": 0,
        "timestamp": 123123132123,
        "transacttime": 0,
        "value": "100.0"
      }
    ],
    "btc_usd_spot": [
      {
        "AvgPx": "0",
        "LastLiquidityInd": "0",
        "LastPx": "0",
        "LastQty": "0",
        "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
        "cancelondisconnect": 0,
        "clorderid": "",
        "cumqty": "0",
        "execid": "",
        "exectype": 1,
        "expiry": 0,
        "fill_price": "0",
        "instrument": "btc_usd_spot",
        "leavesqty": "10",
        "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "orderqty": "10",
        "ordrejreason": "",
        "ordstatus": 4,
        "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "ordtype": 1,
        "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "price": "0.1",
        "side": 1,
        "stoppx": "0",
        "time_in_force": 0,
        "timestamp": 123123132123,
        "transacttime": 0,
        "value": "1.0"
      }
    ]
  }
}

Retrieves all cancelled orders. Similar to order history.

Endpoint

https://api.bitwyre.com/private/orders/cancelled

Request Payload Fields

This API does not require request payload

Response Data

A dictionary, where the keys are the symbols and the values are an array of currently cancelled order(s), see Execution report Response.

Getting Order Info

Request


Getting one specific order detail

curl "https://api.bitwyre.com/private/orders/info/732f066e-feed-baad-beef-e000ed83243a?nonce=17081945&checksum=<payload_checksum>&payload=&page=1&per_page=1" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Getting all orders details

curl "https://api.bitwyre.com/private/orders/info/all?nonce=<nonce>&checksum=<checksum>&payload=&page=1&per_page=1" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

Getting orders details

{
  "error": [],
  "result": [
    {
      "AvgPx": "0",
      "LastLiquidityInd": "0",
      "LastPx": "0",
      "LastQty": "0",
      "account": "9927e7e9-c6d0-43ad-9443-8bb6b56ce1fb",
      "cancelondisconnect": 0,
      "clorderid": "",
      "cumqty": "1e-06",
      "execid": "",
      "exectype": 1,
      "expiry": 0,
      "fill_price": "5500.0",
      "instrument": "btc_idr_spot",
      "leavesqty": "9e-06",
      "orderid": "9927e7e9-c6d0-43ad-9443-8bb6b56ce1fc",
      "orderqty": "1e-05",
      "ordrejreason": "",
      "ordstatus": 1,
      "ordstatusReqID": "9927e7e9-c6d0-43ad-9443-8bb6b56ce1fe",
      "ordtype": 1,
      "origclid": "9927e7e9-c6d0-43ad-9443-8bb6b56ce1fd",
      "price": "5000.0",
      "side": 1,
      "stoppx": "6000.0",
      "time_in_force": 0,
      "timestamp": 1231123123,
      "transacttime": 123123,
      "value": "5000000.0"
    }
  ],
  "meta": {
    "has_next": true,
    "has_prev": false,
    "next_page": 2,
    "page": 1,
    "pages": 5,
    "prev_page": null,
    "total_count": 5
  }
}

Retrieves information on a specific order or all orders.

Endpoint

https://api.bitwyre.com/private/orders/info/:order_id

Request Fields/Parameters

Query Parameter Value Required Description
order_id uuid True specific order_id to get info from. When specified as all, the endpoint will return all orders (open and closed)
Parameter Value Required Description
page int false Page number
per_page int false Number result to show. Default 50 result per page

Response Data

See Execution report Response.

Getting Order Histories

Request

curl 'https://api.bitwyre.com/private/rust/order/histories?payload={"instrument": "all","per_page": 30}' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "btc_usdt_futures": [
      {
        "cancel_order_id": "",
        "filled": "1",
        "instrument": "btc_usd_spot",
        "order_id": 1,
        "remaining": "1",
        "fill_price": "1000",
        "status": 1,
        "time": 123123
      }
    ]
  },
  "meta": {
    "has_next": true,
    "has_prev": false,
    "next_page": 2,
    "page": 1,
    "pages": 5,
    "prev_page": null,
    "total_count": 5
  }
}

Retrieves all order histories for current instrument.

Endpoint

https://api.bitwyre.com/private/rust/order/histories

Request Fields

See REST Private API Data.

Request Payload Fields

When no payload specified, it will return all order histories.

Payload Fields Value Required Description
instrument string false base asset, quote asset, product filter, delimited with an _ (underscore).
from_time int false nanosecond timestamp for oldest order to be enumerated.
to_time int false nanosecond timestamp for newest order to be enumerated.
page int false Page number
per_page int false Number result to show. Default 50 result per page

Getting Order Journey

Request

curl 'https://api.bitwyre.com/private/orders/journey?nonce=17081945&checksum=<payload_checksum>&payload={"order_id":"da5f12ea-8c7c-4cab-83a2-c21912aa51e9"}' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "da5f12ea-8c7c-4cab-83a2-c2191": [
      {
        "cancel_order_id": "",
        "qty": "10000", // total number of order requested
        "filled": "8500",
        "instrument": "btc_usd_spot",
        "order_id": "da5f12ea-8c7c-4cab-83a2-c2191",
        "remaining": "1500",
        "cancelled": "0",
        "accumulated_percentage": "85%",
        "incremental_percentage": "85%",
        "status": 1,
        "time": 1621570548809209000
      },
      {
        "cancel_order_id": "",
        "qty": "10000", // total number of order requested
        "filled": "9000",
        "instrument": "btc_usd_spot",
        "order_id": "da5f12ea-8c7c-4cab-83a2-c2191",
        "remaining": "1000",
        "cancelled": "0",
        "accumulated_percentage": "90%",
        "incremental_percentage": "5%",
        "status": 1,
        "time": 1621570557593313000
      }
    ]
  }
}

Retrieves all order histories for current order_id

Endpoint

https://api.bitwyre.com/private/orders/journey

Request Payload Fields

When no payload specified, it will return all order histories.

Payload Fields Value Required Description
order_id string true Order UUID

Cancelling an Open Order or All Open Orders

Request

curl "https://api.bitwyre.com/private/rust/order?nonce=17081945&checksum=<payload_checksum>&payload={'order_ids':['a9e3d010-3169-489d-9063-ced912b0fdc9', 'a9e3d010-3169-489d-9063-ced912b0fdc9'], 'qtys':[1, 3]}" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X DELETE

Response

{
  "error": [],
  "result": {
    "AvgPx": "0",
    "LastLiquidityInd": "0",
    "LastPx": "0",
    "LastQty": "0",
    "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
    "cancelondisconnect": 0,
    "clorderid": "",
    "cumqty": "0",
    "execid": "",
    "exectype": 5,
    "expiry": 0,
    "fill_price": "0",
    "instrument": "btc_idr_spot",
    "leavesqty": "10",
    "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "orderqty": "10",
    "ordrejreason": "",
    "ordstatus": 6,
    "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "ordtype": 3,
    "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "price": "10.0",
    "side": 1,
    "stoppx": "0",
    "time_in_force": 0,
    "timestamp": 123123132123,
    "transacttime": 0,
    "value": "100.0"
  }
}

Cancels a specific order.

Endpoint

https://api.bitwyre.com/private/rust/order

Request Fields/Parameters

Query Parameter Value Required Description
order_ids list True list of order_ids to cancel. When specified as an empty list, the endpoint will cancel all open orders
qtys list True list of qtys to cancel corresponding to the order_ids with the same list index

When qtys specified as an empty list, the endpoint will cancel max amount on every order_ids , when only one is specified, endpoint will cancel every order_ids to that amount, if -1 is specified, it cancels all amount

Response Data

See Execution report Response.

Cancelling an Open Order per Instrument

Request

curl "https://api.bitwyre.com/private/rust/order/btc_usdt_spot?nonce=17081945&checksum=<payload_checksum>&payload=" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X DELETE

Response

{
  "error": [],
  "result": {
    "AvgPx": "0",
    "LastLiquidityInd": "0",
    "LastPx": "0",
    "LastQty": "0",
    "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
    "cancelondisconnect": 0,
    "clorderid": "",
    "cumqty": "0",
    "execid": "",
    "exectype": 5,
    "expiry": 0,
    "fill_price": "0",
    "instrument": "btc_usdt_spot",
    "leavesqty": "10",
    "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "orderqty": "10",
    "ordrejreason": "",
    "ordstatus": 6,
    "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "ordtype": 3,
    "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "price": "10.0",
    "side": 1,
    "stoppx": "0",
    "time_in_force": 0,
    "timestamp": 123123132123,
    "transacttime": 0,
    "value": "100.0"
  }
}

Cancels all open orders for a specific instrument.

Endpoint

https://api.bitwyre.com/private/rust/order/<string:instrument>

Request Fields/Parameters

Query Parameter Value Required Description
instrument string True specific instrument

Response Data

See Execution report Response.

Closing an Open Positions or All Open Positions

Request

curl "https://api.bitwyre.com/private/position/close?nonce=17081945&checksum=<payload_checksum>&payload={'position_ids':['a9e3d010-3169-489d-9063-ced912b0fdc9', 'a9e3d010-3169-489d-9063-ced912b0fdc9']}" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X DELETE

Response

{
  "error": [],
  "result": {
    "AvgPx": "0",
    "LastLiquidityInd": "0",
    "LastPx": "0",
    "LastQty": "0",
    "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
    "cancelondisconnect": 0,
    "clorderid": "",
    "cumqty": "0",
    "execid": "",
    "exectype": 5,
    "expiry": 0,
    "fill_price": "0",
    "instrument": "btc_idr_spot",
    "leavesqty": "10",
    "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "orderqty": "10",
    "ordrejreason": "",
    "ordstatus": 6,
    "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "ordtype": 3,
    "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "price": "10.0",
    "side": 1,
    "stoppx": "0",
    "time_in_force": 0,
    "timestamp": 123123132123,
    "transacttime": 0,
    "value": "100.0"
  }
}

Closing a specific position or all positions.

Endpoint

https://api.bitwyre.com/private/positions/close/

Request Fields/Parameters

Query Parameter Value Required Description
position_ids list True list of position_ids to close. When specified as an empty list, the endpoint will close all open positions

Response Data

See Execution report Response.

Closing Open Positions per Instrument

Request

curl "https://api.bitwyre.com/private/positions/closed/instrument/btcusdx_perp_futures?nonce=17081945&checksum=<payload_checksum>&payload=" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X DELETE

Response

{
  "error": [],
  "result": {
    "AvgPx": "0",
    "LastLiquidityInd": "0",
    "LastPx": "0",
    "LastQty": "0",
    "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
    "cancelondisconnect": 0,
    "clorderid": "",
    "cumqty": "0",
    "execid": "",
    "exectype": 5,
    "expiry": 0,
    "fill_price": "0",
    "instrument": "btc_usdt_spot",
    "leavesqty": "10",
    "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "orderqty": "10",
    "ordrejreason": "",
    "ordstatus": 6,
    "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "ordtype": 3,
    "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "price": "10.0",
    "side": 1,
    "stoppx": "0",
    "time_in_force": 0,
    "timestamp": 123123132123,
    "transacttime": 0,
    "value": "100.0"
  }
}

Closes all open position for a specific instrument.

Endpoint

https://api.bitwyre.com/private/position/closed/instrument/<string:derivatives_instrument>

Request Fields/Parameters

Query Parameter Value Required Description
instrument string True specific instrument

Response Data

See Execution report Response.

Getting Trade History

curl 'https://api.bitwyre.com/private/rust/trades?payload={"instrument": "btc_usdt_spot"}' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "btc_usd_spot": [
      {
        "exec_price": 20.0,
        "exec_qty": 1.0,
        "exec_type": 1,
        "exec_value": 20000.0,
        "fee_paid": 0.005,  # if positive, it is rebate
        "fee_rate": 0.0001,
        "fee_type": 1,
        "notes": "insert notes",
        "order_price": 0,
        "order_qty": 0,
        "order_remaining": 0,
        "order_type": 1,
        "order_uuid": "9927e7e9-c6d0-43ad-9443-8bb6b56ce1fd",
        "side": 1,
        "status": 1,
        "symbol": "btc_usd_spot",
        "timestamp": 123123,
        "user_uuid": "9927e7e9-c6d0-43ad-9443-8bb6b56ce1fb"
      },
      {
        "exec_price": 20.0,
        "exec_qty": 1.0,
        "exec_type": 1,
        "exec_value": 20000.0,
        "fee_paid": 0.005,  # if positive, it is rebate
        "fee_rate": 0.0001,
        "fee_type": 1,
        "notes": "insert notes",
        "order_price": 0,
        "order_qty": 0,
        "order_remaining": 0,
        "order_type": 1,
        "order_uuid": "9927e7e9-c6d0-43ad-9443-8bb6b56ce1fe",
        "side": 1,
        "status": 1,
        "symbol": "btc_usd_spot",
        "timestamp": 123123,
        "user_uuid": "9927e7e9-c6d0-43ad-9443-8bb6b56ce1fb"
      }
    ]
  },
  "meta": {
    "has_next": true,
    "has_prev": false,
    "next_page": 2,
    "page": 1,
    "pages": 5,
    "prev_page": null,
    "total_count": 10
  }
}

Retrieves some latest buying/selling transaction history.

Endpoint

https://api.bitwyre.com/private/rust/trades

Request Payload Fields

JSON Field Data Type Required Remark
instrument string false base asset, quote asset, product filter, delimited with an _ (underscore).
from_time big-integer false inclusive historical time offset, unixtime in nanoseconds.
to_time big-integer false exclusive historical time limit, unixtime in nanoseconds.
page int false Page number
per_page int false Number result to show. Default 50 result per page

Request Parameters

See REST Private API Data.

Response Types

Dictionary of instrument and it's trades info, trade info fields:

JSON Field Data Type Remark
id uuid-string universal unique id of the trade.
time big-integer Trade time, unixtime in nanoseconds.
type enum-string "buy" for buy, "sell" for sell.
price float-string quote price for the base asset of the trade.
volume float-string base asset amount of the trade.
total float-string total quote value of the trade.
fee_percentage float-string percentage of the fee.
fee float-string fee value.
fee_currency string asset of the fee, in most case is the quote asset.

Getting Trading Notifications

Example: Get All Notifications

curl "https://api.bitwyre.com/private/account/notifications/trading"
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
      }"
  -X GET

Response

{
  "error": [],
  "result": [
    {
      "OrderRejected": [
        {
          "notification_message": "Notification Message OrderRejected #2",
          "timestamp": 1638408842500649920
        },
        {
          "notification_message": "Notification Message OrderRejected #1",
          "timestamp": 1638408841588082866
        }
      ],
      "OrderCancelled": [
        {
          "notification_message": "Notification Message OrderCancelled #3",
          "timestamp": 1638408842505009193
        },
        {
          "notification_message": "Notification Message OrderCancelled #2",
          "timestamp": 1638408842409370461
        },
        {
          "notification_message": "Notification Message OrderCancelled #1",
          "timestamp": 1638408842315787091
        }
      ],
      "OrderFilled": [
        {
          "notification_message": "Notification Message OrderFilled #1",
          "timestamp": 1638408841987827578
        }
      ],
      "Deposit": [
        {
          "notification_message": "Notification Message Deposit #1",
          "timestamp": 1638408842290246580
        }
      ],
      "Withdrawal": [
        {
          "notification_message": "Notification Message Withdrawal #2",
          "timestamp": 1638408842131569666
        },
        {
          "notification_message": "Notification Message Withdrawal #1",
          "timestamp": 1638408842048839032
        }
      ],
      "KYC": [
        {
          "notification_message": "Notification Message KYC #1",
          "timestamp": 1638408842230728389
        }
      ]
    }
  ]
}

Example: Get Specific Notifications

curl "https://api.bitwyre.com/private/account/notifications/trading?trading_notification_type=0?limit=2"
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
      }"
  -X GET

Response

{
  "error": [],
  "result": [
    {
      "OrderRejected": [
        {
          "notification_message": "Notification Message OrderRejected #2",
          "timestamp": 1638408842500649920
        },
        {
          "notification_message": "Notification Message OrderRejected #1",
          "timestamp": 1638408841588082866
        }
      ]
    }
  ]
}

Endpoint

https://api.bitwyre.com/private/account/notifications/trading

Request Fields/Parameters

Query Parameter Value Required Description
trading_notification_type integer False Type of notification. Default all. See Trading Notification Type
limit integer False No of notifications per type. Default `100 (max)

Response Data (Array of JSON Object)

An array of JSON object, where the keys of the object are notification type names and the values are an array of object with the following specifications.

JSON Field Data Type Remark
notification_message string Content of notification message
timestamp integer Unixtime nanosecond timestamp

Search Favorites

Search ticker, trades, and depth data of pairs in one endpoint

Request

curl "https://api.bitwyre.com/private/favorites?instruments=['btc_usdt_spot']" -X GET

Response

{
  "error": [],
  "result": {
    "favorites": [
      {
        "btc_usdt_spot": {
          "askbook": [["400.0", "2.0"]],
          "best_ask": "11000",
          "best_bid": "10075",
          "bidbook": [["310.0", "5.0"]],
          "high": "11000",
          "last": "10100",
          "last_trade_price": "10000.0",
          "last_trade_side": 1,
          "last_trade_timestamp": 1571747594573320135,
          "last_trade_uuid": "752837c7-aec6-41f8-bb07-286f859f2718",
          "last_trade_value": "20000.0",
          "last_trade_volume": "2.0",
          "low": "10000",
          "percent_change": "110.0",
          "timestamp": 1571747594573320135,
          "volume_base": "34",
          "volume_quote": "267346.0"
        }
      }
    ]
  }
}

Endpoint

https://api.bitwyre.com/private/favorites

Request Fields/Parameters

Query Parameter Data Type Required Remark
instruments list false Instruments of interest (eg ['btc_usdt_spot','eth_usdt_spot'])

Notes: if no instrument is specified, endpoint will return all available instrument

Response Types (JSON Object)

Returns

JSON Field Data Type Remark
error list Error messages, if any
result dictionaries contain list of dictionaries of the data, grouped by product, market, instrument

Please check ticker, trades, and depth endpoint documentation for explanation of the dictionary members

Derivatives API Endpoints

Get Account Collaterals

Example:

curl "https://api.bitwyre.com/private/derivatives/account" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X GET

Response

{
  "error" : [],
  "result" : 
  {
        "collateral": {"usd": "91275.565", "idr": "0"},
        "free_collateral": {"usd": "91275.565", "idr": "0"},
        "total_acount_value": {"usd": "91275.565", "idr": "0"},
        "unrealized_pnl": {"usd": "0", "idr": "0"},
        "maintenance_margin_requirements": "0.03",
        "initial_margin_fraction": "1.0",
        "margin_fraction": "nan",
        "open_margin_fraction": "0",
        "liquidating": 0,
        "backstop_provider": 0,
   }

}

Get Account Collateral Informations

Endpoint

https://api.bitwyre.com/private/derivatives/account

Get Leverage

Example:

curl "https://api.bitwyre.com/private/derivatives/leverage?instrumet=btc_usdx_futures_perp" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X GET

Response

{
  "error" : [],
  "result": 
      { "current_leverage": 3, "instrument": "btc_usdx_futures_perp" }
}

Get Current Leverage

Endpoint

https://api.bitwyre.com/private/derivatives/leverage

Change Leverage

Example:

curl "https://api.bitwyre.com/private/derivatives/leverage?instrumet=btc_usdx_futures_perp" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
          \"instrument\": \"btc_usdx_futures_perp\",\
          \"leverage\": 4,\
        }\
      }"

Response

{
  "error" : [],
  "result": 
      {
        "message": "Leverage has been set to 4x successfully",
        "new_leverage": 4,
        "old_leverage": 1,
        "success": true
      }
}

Change Current Leverage

Endpoint

https://api.bitwyre.com/private/derivatives/leverage

Get Open Positions

Example:

curl "https://api.bitwyre.com/private/derivatives/positions?instrumet=btc_usdx_futures_perp&page=1&per_page=50" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X GET

Response

{
  "error" : [],
  "meta": {
    "has_next": false,
    "has_prev": false,
    "next_page": null,
    "prev_page": null,
    "page": 1, 
    "pages": 1,
    "total_count": 1,
  },
  "result": 
      {
        "btc_usdx_futures_perp": {
            "instrument": "btc_usdx_futures_perp",
            "position_uuid": "dfc8e496-30c8-49d4-9f41-8fbb8c549efe",
            "index_name": "BTC-USD",
            "side": 1,
            "leverage": 10,
            "derivatives_type": 1,
            "next_funding": "0.481944",
            "next_funding_datetime": "1685525465.481945",
            "expiry": "0",
            "margin_fraction": "0.29688",
            "maintenance_margin_requirements": "0.03",
            "size": "20",
            "notional_size": "400000",
            "average_price": "19000",
            "bankruptcy_price": "13060",
            "liquidation_price": "16872",
            "collateral_used": "41000",
            "expiry_price": "0",
            "realized_pnl": "0",
            "unrealized_pnl": "20000",
            "status": 1,
        }
      }
}

Get Open Positions

Endpoint

https://api.bitwyre.com/private/derivatives/positions

Reduce Position SIze

Example:

curl "https://api.bitwyre.com/private/derivatives/reduce" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
          \"position_uuid\": \"dfc8e496-30c8-49d4-9f41-8fbb8c549ef\",\
          \"size\": \"1\",\
        }\
      }"

Response

{
  "error" : [],
  "result": {
    "leverage": 1,
    "refrreal_code": "xr8gjhq",
    "last_price": "27000",
    "entry_price": "26000",
    "position": "LONG",
    "roe": "0.001"
  }
}

Reduce Positions Size

Endpoint

https://api.bitwyre.com/private/derivatives/reduce

Close Position

Example:

curl "https://api.bitwyre.com/private/derivatives/close" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
          \"position_uuid\": \"dfc8e496-30c8-49d4-9f41-8fbb8c549ef\",\
        }\
      }"

Response

{
  "error" : [],
  "result": {
    "leverage": 1,
    "refrreal_code": "xr8gjhq",
    "last_price": "27000",
    "entry_price": "26000",
    "position": "LONG",
    "roe": "0.001"
  }
}

Reduce Positions Size

Endpoint

https://api.bitwyre.com/private/derivatives/reduce

Opening a New Order

Example: New Market Order

curl "https://api.bitwyre.com/private/orders" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
          \"instrument\": \"btc_usdx_futures_perp\",\
          \"side\": 2,\
          \"ordtype\": 1,\
          \"orderqty\": \"2.9301\",\
        }\
      }"

Response (Execution Report)

{
  "error": [],
  "result": {
    "AvgPx": "0",
    "LastLiquidityInd": "0",
    "LastPx": "0",
    "LastQty": "0",
    "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
    "cancelondisconnect": 0,
    "clorderid": "",
    "cumqty": "0",
    "execid": "",
    "exectype": 0,
    "expiry": 0,
    "fill_price": "0",
    "instrument": "btc_usdx_futures_perp",
    "leavesqty": "2.9301",
    "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "orderqty": "2.9301",
    "ordrejreason": "",
    "ordstatus": 0,
    "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "ordtype": 1,
    "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "price": "10.0",
    "side": 2,
    "stoppx": "0",
    "time_in_force": 0,
    "timestamp": 123123132123,
    "transacttime": 0,
    "value": "100.0"
  }
}

Example: New Limit Order

curl "https://api.bitwyre.com/private/orders" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
          \"instrument\": \"btc_usdx_futures_perp\",\
          \"side\": 1,\
          \"ordtype\": 2,\
          \"price\": \"9800.5\",\
          \"orderqty\": \"2.9301\",\
        }\
      }"

Response (Execution Report)

{
  "error": [],
  "result": {
    "AvgPx": "0",
    "LastLiquidityInd": "0",
    "LastPx": "0",
    "LastQty": "0",
    "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
    "cancelondisconnect": 0,
    "clorderid": "",
    "cumqty": "0",
    "execid": "",
    "exectype": 0,
    "expiry": 0,
    "fill_price": "0",
    "instrument": "btc_usdx_futures_perp",
    "leavesqty": "2.9301",
    "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "orderqty": "2.9301",
    "ordrejreason": "",
    "ordstatus": 0,
    "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "ordtype": 2,
    "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "price": "9800.5",
    "side": 1,
    "stoppx": "0",
    "time_in_force": 0,
    "timestamp": 123123132123,
    "transacttime": 0,
    "value": "100.0"
  }
}

Example: New Stop Order

curl "https://api.bitwyre.com/private/orders" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
          \"instrument\": \"btc_usdx_futures_perp\",\
          \"side\": 2,\
          \"ordtype\": 3,\
          \"stoppx\": \"9850.35\",\
          \"orderqty\": \"2.9301\",\
        }\
      }"

Response (Execution Report)

{
  "error": [],
  "result": {
    "AvgPx": "0",
    "LastLiquidityInd": "0",
    "LastPx": "0",
    "LastQty": "0",
    "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
    "cancelondisconnect": 0,
    "clorderid": "",
    "cumqty": "0",
    "execid": "",
    "exectype": 0,
    "expiry": 0,
    "fill_price": "0",
    "instrument": "btc_usdx_futures_perp",
    "leavesqty": "2.9301",
    "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "orderqty": "2.9301",
    "ordrejreason": "",
    "ordstatus": 0,
    "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "ordtype": 3,
    "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "price": "0",
    "side": 2,
    "stoppx": "9850.35",
    "time_in_force": 0,
    "timestamp": 123123132123,
    "transacttime": 0,
    "value": "100.0"
  }
}

Example: New Stop-Limit Order

curl "https://api.bitwyre.com/private/orders" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
          \"instrument\": \"btc_usdx_futures_perp\",\
          \"side\": 1,\
          \"ordtype\": 4,\
          \"price\": \"9800.5\",\
          \"stoppx\": \"9750\",\
          \"orderqty\": \"2.9301\",\
        }\
      }"

Response (Execution Report)

{
  "error": [],
  "result": {
    "AvgPx": "0",
    "LastLiquidityInd": "0",
    "LastPx": "0",
    "LastQty": "0",
    "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
    "cancelondisconnect": 0,
    "clorderid": "",
    "cumqty": "0",
    "execid": "",
    "exectype": 0,
    "expiry": 0,
    "fill_price": "0",
    "instrument": "btc_usdx_futures_perp",
    "leavesqty": "2.9301",
    "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "orderqty": "2.9301",
    "ordrejreason": "",
    "ordstatus": 0,
    "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "ordtype": 4,
    "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "price": "9800.5",
    "side": 1,
    "stoppx": "9750",
    "time_in_force": 0,
    "timestamp": 123123132123,
    "transacttime": 0,
    "value": "100.0"
  }
}

Create a new buy/sell order

Endpoint

https://api.bitwyre.com/private/orders

Create Order Payload

JSON Field Value Required Description
clordid uuid-string false client generated uuid string, no mandatory.
instrument string true base asset, quote asset, product filter, delimited with an _ (underscore).
side enum-number true side of order, currently only supports buy (1) or sell (2).
ordtype enum-number true Supports market (1), limit (2), stop (3), or stop_limit (4) order, post only (19), market IOC (20), limit IOC (21), and FOK (22)
price float-string false mandatory for limit and stop_limit order.
stoppx float-string false mandatory for stop and stop_limit order.
orderqty float-string true order quantity for the base asset.
timeinforce enum-number false order lifetime enforcement, see Time In Force.
expiretime big-integer false mandatory when "timeinforce" is set to gtd, unix time in nanoseconds.
execinst string false not-yet-supported, reserved for future.
cancelondisconnect bool false cancel order on disconnection, not supported in REST (yet).

One must make sure that price, quantity and also value are in the the currency unit that are from the base and quote pairs. For example if the instrument is btc_usdt_spot, the quantity is btc and the price and value are in usdt. Note that our clearing engine does clearing inside our database based on 64-bit integer computations. Thus, to reduce the amount of increment errors, we also highly suggest you to compute the quantity in the smallest unit of the base asset and the value in the smallest unit of the quote asset. For the previous example of btc_usdt_spot the smallest unit of btc is satoshi, 10^-8 of a btc, and for usdt it is 10^-6 of a usdt. For a quantity of 1 btc we will process in our backend in the integer 100,000,000and for1 usdtit will be1,000,000`. This is the same for Monero (piconero) and ZCash (zatoshi), the exception is only for Ethereum, where we use GWei in our backend computations.

Getting Open Orders

Request

Getting specific open orders
curl 'https://api.bitwyre.com/private/orders/open?nonce=17081945&checksum=<payload_checksum>&payload={"instrument":"btc_usdx_futures_perp", "from_time": 1593487780108470000, "to_time": 1593487786824088000 }&page=1&per_page=1' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET
Getting all open orders
curl 'https://api.bitwyre.com/private/orders/open/all?nonce=17081945&checksum=<payload_checksum>&payload=&page=1&per_page=1' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "btc_usdt_spot": [
      {
        "AvgPx": "0",
        "LastLiquidityInd": "0",
        "LastPx": "0",
        "LastQty": "0",
        "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
        "cancelondisconnect": 0,
        "clorderid": "",
        "cumqty": "0",
        "execid": "",
        "exectype": 1,
        "expiry": 0,
        "fill_price": "0",
        "instrument": "btc_usdx_futures_perp",
        "leavesqty": "1",
        "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "orderqty": "1",
        "ordrejreason": "",
        "ordstatus": 0,
        "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "ordtype": 1,
        "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "price": "10.0",
        "side": 1,
        "stoppx": "0",
        "time_in_force": 0,
        "timestamp": 123123132123,
        "transacttime": 0,
        "value": "100.0"
      }
    ]
  },
  "meta": {
    "has_next": true,
    "has_prev": false,
    "next_page": 2,
    "page": 1,
    "pages": 5,
    "prev_page": null,
    "total_count": 5
  }
}

Retrieves curent open orders.

Endpoint

https://api.bitwyre.com/private/orders/open https://api.bitwyre.com/private/orders/open/all

Request Payload Fields

When no payload specified, it will return all orders symbols that currently in open position. Otherwise on /open/all it automatically returns all open order, no payload necessary

Payload Fields Value Required Description
instrument string false base asset, quote asset, product filter, delimited with an _ (underscore).
from_time int false nanosecond timestamp for oldest order to be enumerated.
to_time int false nanosecond timestamp for newest order to be enumerated.

Request Parameters

Parameter Value Required Description
page int false Page number
per_page int false Number result to show. Default 50 result per page

Response Data

A dictionary, where the keys are the symbols and the values are an array of currently open order(s), see Execution report Response.

Getting Closed Orders

Request

Getting specific closed order
curl 'https://api.bitwyre.com/private/orders/closed?nonce=17081945&checksum=<payload_checksum>&payload={"instrument":"btc_usdt_spot", "from_time": 1593487780108470000, "to_time": 1593487786824088000}?page=1&per_page=5' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET
Getting all closed order
curl 'https://api.bitwyre.com/private/orders/closed/all?nonce=17081945&checksum=<payload_checksum>&page=1&per_page=3' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "btc_idr_spot": [
      {
        "AvgPx": "0",
        "LastLiquidityInd": "0",
        "LastPx": "0",
        "LastQty": "0",
        "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
        "cancelondisconnect": 0,
        "clorderid": "",
        "cumqty": "0",
        "execid": "",
        "exectype": 1,
        "expiry": 0,
        "fill_price": "0",
        "instrument": "btc_idr_spot",
        "leavesqty": "1",
        "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "orderqty": "1",
        "ordrejreason": "",
        "ordstatus": 1,
        "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "ordtype": 1,
        "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "price": "10.0",
        "side": 1,
        "stoppx": "0",
        "time_in_force": 0,
        "timestamp": 123123132123,
        "transacttime": 0,
        "value": "100.0"
      },
      {
        "AvgPx": "0",
        "LastLiquidityInd": "0",
        "LastPx": "0",
        "LastQty": "0",
        "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
        "cancelondisconnect": 0,
        "clorderid": "",
        "cumqty": "0",
        "execid": "",
        "exectype": 1,
        "expiry": 0,
        "fill_price": "0",
        "instrument": "btc_idr_spot",
        "leavesqty": "1",
        "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc1",
        "orderqty": "1",
        "ordrejreason": "",
        "ordstatus": 1,
        "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc1",
        "ordtype": 1,
        "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc1",
        "price": "10.0",
        "side": 1,
        "stoppx": "0",
        "time_in_force": 0,
        "timestamp": 2345676543246,
        "transacttime": 0,
        "value": "100.0"
      }
    ],
    "btc_usd_spot": [
      {
        "AvgPx": "0",
        "LastLiquidityInd": "0",
        "LastPx": "0",
        "LastQty": "0",
        "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
        "cancelondisconnect": 0,
        "clorderid": "",
        "cumqty": "0",
        "execid": "",
        "exectype": 1,
        "expiry": 0,
        "fill_price": "0",
        "instrument": "btc_usd_spot",
        "leavesqty": "1",
        "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "orderqty": "1",
        "ordrejreason": "",
        "ordstatus": 1,
        "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "ordtype": 1,
        "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "price": "0.1",
        "side": 1,
        "stoppx": "0",
        "time_in_force": 0,
        "timestamp": 123123132123,
        "transacttime": 0,
        "value": "1.0"
      }
    ]
  },
  "meta": {
    "has_next": true,
    "has_prev": true,
    "next_page": 2,
    "page": 1,
    "pages": 5,
    "prev_page": null,
    "total_count": 15
  }
}

Retrieves currently closed orders. Similar to order history.

Endpoint

https://api.bitwyre.com/private/orders/closed https://api.bitwyre.com/private/orders/closed/all

Request Payload Fields

For showing closed order based on parameters on /closed. Otherwise on /closed/all it automatically returns all closed order, no payload necessary

Payload Fields Value Required Description
instrument string false base asset, quote asset, product filter, delimited with an _ (underscore).
from_time int false nanosecond timestamp for oldest order to be enumerated.
to_time int false nanosecond timestamp for newest order to be enumerated.

Request Parameters

Parameter Value Required Description
page int false Page number
per_page int false Number result to show. Default 50 result per page

Response Data

A dictionary, where the keys are the symbols and the values are an array of currently closed order(s), see Execution report Response.

Getting All Cancelled Orders

Request

curl 'https://api.bitwyre.com/private/orders/cancelled?nonce=17081945&checksum=<payload_checksum>&payload=' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "btc_idr_spot": [
      {
        "AvgPx": "0",
        "LastLiquidityInd": "0",
        "LastPx": "0",
        "LastQty": "0",
        "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
        "cancelondisconnect": 0,
        "clorderid": "",
        "cumqty": "0",
        "execid": "",
        "exectype": 1,
        "expiry": 0,
        "fill_price": "0",
        "instrument": "btc_idr_spot",
        "leavesqty": "10",
        "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "orderqty": "10",
        "ordrejreason": "",
        "ordstatus": 4,
        "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "ordtype": 1,
        "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "price": "10.0",
        "side": 1,
        "stoppx": "0",
        "time_in_force": 0,
        "timestamp": 123123132123,
        "transacttime": 0,
        "value": "100.0"
      }
    ],
    "btc_usd_spot": [
      {
        "AvgPx": "0",
        "LastLiquidityInd": "0",
        "LastPx": "0",
        "LastQty": "0",
        "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
        "cancelondisconnect": 0,
        "clorderid": "",
        "cumqty": "0",
        "execid": "",
        "exectype": 1,
        "expiry": 0,
        "fill_price": "0",
        "instrument": "btc_usd_spot",
        "leavesqty": "10",
        "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "orderqty": "10",
        "ordrejreason": "",
        "ordstatus": 4,
        "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "ordtype": 1,
        "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
        "price": "0.1",
        "side": 1,
        "stoppx": "0",
        "time_in_force": 0,
        "timestamp": 123123132123,
        "transacttime": 0,
        "value": "1.0"
      }
    ]
  }
}

Retrieves all cancelled orders. Similar to order history.

Endpoint

https://api.bitwyre.com/private/orders/cancelled

Request Payload Fields

This API does not require request payload

Response Data

A dictionary, where the keys are the symbols and the values are an array of currently cancelled order(s), see Execution report Response.

Getting Open Derivatives Positions

Request

Getting all open derivatives positions in the time range 1593487780108470000 and 1593487786824088000
curl 'https://api.bitwyre.com/private/positions/open?nonce=17081945&checksum=<payload_checksum>&payload={"instrument":"btcusdx_perp_futures", "from_time": 1593487780108470000, "to_time": 1593487786824088000 }&page=1&per_page=1' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET
Getting all open derivatives positions
curl 'https://api.bitwyre.com/private/positions/open/all?nonce=17081945&checksum=<payload_checksum>&payload=&page=1&per_page=1' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "btcusdx_perp_futures": [
      {
        "open_timestamp": 1657440070843300000,
        "closed_timestamp": 0,
        "trade_id": "5e31da45-f0c9-430a-844c-38e001b84cee",
        "instrument": "btcusdx_perp_futures",
        "derivatives_type": "futures",
        "derivatives_subtype": "perpetualswap",
        "mark_price": 21000,
        "est_liquidation_price": 11000,
        "bankruptcy_price": 10500,
        "avg_open_price": 20490,
        "breakeven_price": 20500,
        "position_size": 1,
        "notional_size": 21000,
        "index": "btcusdx",
        "settlement_asset": "usd",
        "time_to_expiry": "NA", // perpetuals have no expiry
        "days_to_expiry": "NA", // perpetuals have no expiry
        "strike_price": "NA", // perpetual futures have no strike price
        "option_type": "NA", // can be CALL or PUT
        "implied_volatility": "NA", // futures does not have implied volatility
        "direction": 1, // 1 LONG and 2 SHORT
        "pnl": 500, // in options this is true
      }
    ]
  },
  "meta": {
    "has_next": true,
    "has_prev": false,
    "next_page": 2,
    "page": 1,
    "pages": 5,
    "prev_page": null,
    "total_count": 5
  }
}

Retrieves curent open derivatives positions.

Endpoint

https://api.bitwyre.com/private/positions/open https://api.bitwyre.com/private/positions/open/all

Request Payload Fields

When no payload specified, it will return all position symbols that currently in open position inside the matching engine. Otherwise on /open/all it automatically returns all open position, no payload necessary

Payload Fields Value Required Description
instrument string false base asset, quote asset, product filter, delimited with an _ (underscore).
from_time int false nanosecond timestamp for oldest position to be enumerated.
to_time int false nanosecond timestamp for newest position to be enumerated.

Request Parameters

Parameter Value Required Description
page int false Page number
per_page int false Number result to show. Default 50 result per page

Response Data

A dictionary, where the keys are the symbols and the values are an array of currently open position(s), see Position report Response.

Getting Order Info

Request


Getting one specific order detail

curl "https://api.bitwyre.com/private/orders/info/732f066e-feed-baad-beef-e000ed83243a?nonce=17081945&checksum=<payload_checksum>&payload=&page=1&per_page=1" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Getting all orders details

curl "https://api.bitwyre.com/private/orders/info/all?nonce=<nonce>&checksum=<checksum>&payload=&page=1&per_page=1" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

Getting orders details

{
  "error": [],
  "result": [
    {
      "AvgPx": "0",
      "LastLiquidityInd": "0",
      "LastPx": "0",
      "LastQty": "0",
      "account": "9927e7e9-c6d0-43ad-9443-8bb6b56ce1fb",
      "cancelondisconnect": 0,
      "clorderid": "",
      "cumqty": "1e-06",
      "execid": "",
      "exectype": 1,
      "expiry": 0,
      "fill_price": "5500.0",
      "instrument": "btc_idr_spot",
      "leavesqty": "9e-06",
      "orderid": "9927e7e9-c6d0-43ad-9443-8bb6b56ce1fc",
      "orderqty": "1e-05",
      "ordrejreason": "",
      "ordstatus": 1,
      "ordstatusReqID": "9927e7e9-c6d0-43ad-9443-8bb6b56ce1fe",
      "ordtype": 1,
      "origclid": "9927e7e9-c6d0-43ad-9443-8bb6b56ce1fd",
      "price": "5000.0",
      "side": 1,
      "stoppx": "6000.0",
      "time_in_force": 0,
      "timestamp": 1231123123,
      "transacttime": 123123,
      "value": "5000000.0"
    }
  ],
  "meta": {
    "has_next": true,
    "has_prev": false,
    "next_page": 2,
    "page": 1,
    "pages": 5,
    "prev_page": null,
    "total_count": 5
  }
}

Retrieves information on a specific order or all orders.

Endpoint

https://api.bitwyre.com/private/orders/info/:order_id

Request Fields/Parameters

Query Parameter Value Required Description
order_id uuid True specific order_id to get info from. When specified as all, the endpoint will return all orders (open and closed)
Parameter Value Required Description
page int false Page number
per_page int false Number result to show. Default 50 result per page

Response Data

See Execution report Response.

Getting Order Histories

Request

curl 'https://api.bitwyre.com/private/orders/histories?nonce=17081945&checksum=<payload_checksum>&payload={"instrument":"btc_usdt_futures", "from_time": 1593487780108470000, "to_time": 1593487786824088000}&page=1&per_page=1' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "btc_usdt_futures": [
      {
        "cancel_order_id": "",
        "filled": "1",
        "instrument": "btc_usd_spot",
        "order_id": 1,
        "remaining": "1",
        "fill_price": "1000",
        "status": 1,
        "time": 123123
      }
    ]
  },
  "meta": {
    "has_next": true,
    "has_prev": false,
    "next_page": 2,
    "page": 1,
    "pages": 5,
    "prev_page": null,
    "total_count": 5
  }
}

Retrieves all order histories for current instrument.

Endpoint

https://api.bitwyre.com/private/orders/histories

Request Fields

Parameter Value Required Description
page int false Page number
per_page int false Number result to show. Default 50 result per page

Request Payload Fields

When no payload specified, it will return all order histories.

Payload Fields Value Required Description
instrument string false base asset, quote asset, product filter, delimited with an _ (underscore).
from_time int false nanosecond timestamp for oldest order to be enumerated.
to_time int false nanosecond timestamp for newest order to be enumerated.

Getting Order Journey

Request

curl 'https://api.bitwyre.com/private/orders/journey?nonce=17081945&checksum=<payload_checksum>&payload={"order_id":"da5f12ea-8c7c-4cab-83a2-c21912aa51e9"}' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "da5f12ea-8c7c-4cab-83a2-c2191": [
      {
        "cancel_order_id": "",
        "qty": "10000", // total number of order requested
        "filled": "8500",
        "instrument": "btc_usd_spot",
        "order_id": "da5f12ea-8c7c-4cab-83a2-c2191",
        "remaining": "1500",
        "cancelled": "0",
        "accumulated_percentage": "85%",
        "incremental_percentage": "85%",
        "status": 1,
        "time": 1621570548809209000
      },
      {
        "cancel_order_id": "",
        "qty": "10000", // total number of order requested
        "filled": "9000",
        "instrument": "btc_usd_spot",
        "order_id": "da5f12ea-8c7c-4cab-83a2-c2191",
        "remaining": "1000",
        "cancelled": "0",
        "accumulated_percentage": "90%",
        "incremental_percentage": "5%",
        "status": 1,
        "time": 1621570557593313000
      }
    ]
  }
}

Retrieves all order histories for current order_id

Endpoint

https://api.bitwyre.com/private/orders/journey

Request Payload Fields

When no payload specified, it will return all order histories.

Payload Fields Value Required Description
order_id string true Order UUID

Cancelling an Open Order or All Open Orders

Request

curl "https://api.bitwyre.com/private/orders/cancel?nonce=17081945&checksum=<payload_checksum>&payload={'order_ids':['a9e3d010-3169-489d-9063-ced912b0fdc9', 'a9e3d010-3169-489d-9063-ced912b0fdc9'], 'qtys':[1, 3]}" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X DELETE

Response

{
  "error": [],
  "result": {
    "AvgPx": "0",
    "LastLiquidityInd": "0",
    "LastPx": "0",
    "LastQty": "0",
    "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
    "cancelondisconnect": 0,
    "clorderid": "",
    "cumqty": "0",
    "execid": "",
    "exectype": 5,
    "expiry": 0,
    "fill_price": "0",
    "instrument": "btc_idr_spot",
    "leavesqty": "10",
    "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "orderqty": "10",
    "ordrejreason": "",
    "ordstatus": 6,
    "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "ordtype": 3,
    "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "price": "10.0",
    "side": 1,
    "stoppx": "0",
    "time_in_force": 0,
    "timestamp": 123123132123,
    "transacttime": 0,
    "value": "100.0"
  }
}

Cancels a specific order.

Endpoint

https://api.bitwyre.com/private/orders/cancel/

Request Fields/Parameters

Query Parameter Value Required Description
order_ids list True list of order_ids to cancel. When specified as an empty list, the endpoint will cancel all open orders
qtys list True list of qtys to cancel corresponding to the order_ids with the same list index

When qtys specified as an empty list, the endpoint will cancel max amount on every order_ids , when only one is specified, endpoint will cancel every order_ids to that amount, if -1 is specified, it cancels all amount

Response Data

See Execution report Response.

Cancelling an Open Order per Instrument

Request

curl "https://api.bitwyre.com/private/orders/cancel/instrument/btc_usdt_spot?nonce=17081945&checksum=<payload_checksum>&payload=" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X DELETE

Response

{
  "error": [],
  "result": {
    "AvgPx": "0",
    "LastLiquidityInd": "0",
    "LastPx": "0",
    "LastQty": "0",
    "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
    "cancelondisconnect": 0,
    "clorderid": "",
    "cumqty": "0",
    "execid": "",
    "exectype": 5,
    "expiry": 0,
    "fill_price": "0",
    "instrument": "btc_usdt_spot",
    "leavesqty": "10",
    "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "orderqty": "10",
    "ordrejreason": "",
    "ordstatus": 6,
    "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "ordtype": 3,
    "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "price": "10.0",
    "side": 1,
    "stoppx": "0",
    "time_in_force": 0,
    "timestamp": 123123132123,
    "transacttime": 0,
    "value": "100.0"
  }
}

Cancels all open orders for a specific instrument.

Endpoint

https://api.bitwyre.com/private/orders/cancel/instrument/<string:instrument>

Request Fields/Parameters

Query Parameter Value Required Description
instrument string True specific instrument

Response Data

See Execution report Response.

Closing an Open Positions or All Open Positions

Request

curl "https://api.bitwyre.com/private/position/close?nonce=17081945&checksum=<payload_checksum>&payload={'position_ids':['a9e3d010-3169-489d-9063-ced912b0fdc9', 'a9e3d010-3169-489d-9063-ced912b0fdc9']}" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X DELETE

Response

{
  "error": [],
  "result": {
    "AvgPx": "0",
    "LastLiquidityInd": "0",
    "LastPx": "0",
    "LastQty": "0",
    "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
    "cancelondisconnect": 0,
    "clorderid": "",
    "cumqty": "0",
    "execid": "",
    "exectype": 5,
    "expiry": 0,
    "fill_price": "0",
    "instrument": "btc_idr_spot",
    "leavesqty": "10",
    "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "orderqty": "10",
    "ordrejreason": "",
    "ordstatus": 6,
    "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "ordtype": 3,
    "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "price": "10.0",
    "side": 1,
    "stoppx": "0",
    "time_in_force": 0,
    "timestamp": 123123132123,
    "transacttime": 0,
    "value": "100.0"
  }
}

Closing a specific position or all positions.

Endpoint

https://api.bitwyre.com/private/positions/close/

Request Fields/Parameters

Query Parameter Value Required Description
position_ids list True list of position_ids to close. When specified as an empty list, the endpoint will close all open positions

Response Data

See Execution report Response.

Closing Open Positions per Instrument

Request

curl "https://api.bitwyre.com/private/positions/closed/instrument/btcusdx_perp_futures?nonce=17081945&checksum=<payload_checksum>&payload=" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X DELETE

Response

{
  "error": [],
  "result": {
    "AvgPx": "0",
    "LastLiquidityInd": "0",
    "LastPx": "0",
    "LastQty": "0",
    "account": "a9e3d010-3169-489d-9063-ced912b0fdc8",
    "cancelondisconnect": 0,
    "clorderid": "",
    "cumqty": "0",
    "execid": "",
    "exectype": 5,
    "expiry": 0,
    "fill_price": "0",
    "instrument": "btc_usdt_spot",
    "leavesqty": "10",
    "orderid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "orderqty": "10",
    "ordrejreason": "",
    "ordstatus": 6,
    "ordstatusReqID": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "ordtype": 3,
    "origclid": "a9e3d010-3169-489d-9063-ced912b0fdc9",
    "price": "10.0",
    "side": 1,
    "stoppx": "0",
    "time_in_force": 0,
    "timestamp": 123123132123,
    "transacttime": 0,
    "value": "100.0"
  }
}

Closes all open position for a specific instrument.

Endpoint

https://api.bitwyre.com/private/position/closed/instrument/<string:derivatives_instrument>

Request Fields/Parameters

Query Parameter Value Required Description
instrument string True specific instrument

Response Data

See Execution report Response.

Getting Trade History

curl 'https://api.bitwyre.com/private/trades?nonce=17081945&checksum=<payload_checksum>&payload={"count": 2, "from_time": 1509225871147236500, "to_time": 1709225871147236500, "instrument":"btc_usd_spot"}&page=1&per_page=2' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "btc_usd_spot": [
      {
        "exec_price": 20.0,
        "exec_qty": 1.0,
        "exec_type": 1,
        "exec_value": 20000.0,
        "fee_paid": 0.005,  # if positive, it is rebate
        "fee_rate": 0.0001,
        "fee_type": 1,
        "notes": "insert notes",
        "order_price": 0,
        "order_qty": 0,
        "order_remaining": 0,
        "order_type": 1,
        "order_uuid": "9927e7e9-c6d0-43ad-9443-8bb6b56ce1fd",
        "side": 1,
        "status": 1,
        "symbol": "btc_usd_spot",
        "timestamp": 123123,
        "user_uuid": "9927e7e9-c6d0-43ad-9443-8bb6b56ce1fb"
      },
      {
        "exec_price": 20.0,
        "exec_qty": 1.0,
        "exec_type": 1,
        "exec_value": 20000.0,
        "fee_paid": 0.005,  # if positive, it is rebate
        "fee_rate": 0.0001,
        "fee_type": 1,
        "notes": "insert notes",
        "order_price": 0,
        "order_qty": 0,
        "order_remaining": 0,
        "order_type": 1,
        "order_uuid": "9927e7e9-c6d0-43ad-9443-8bb6b56ce1fe",
        "side": 1,
        "status": 1,
        "symbol": "btc_usd_spot",
        "timestamp": 123123,
        "user_uuid": "9927e7e9-c6d0-43ad-9443-8bb6b56ce1fb"
      }
    ]
  },
  "meta": {
    "has_next": true,
    "has_prev": false,
    "next_page": 2,
    "page": 1,
    "pages": 5,
    "prev_page": null,
    "total_count": 10
  }
}

Retrieves some latest buying/selling transaction history.

Endpoint

https://api.bitwyre.com/private/trades

Request Payload Fields

JSON Field Data Type Required Remark
instrument string false base asset, quote asset, product filter, delimited with an _ (underscore).
count number false limit the latest historical trade data.
from_time big-integer false inclusive historical time offset, unixtime in nanoseconds.
to_time big-integer false exclusive historical time limit, unixtime in nanoseconds.

Request Parameters

Parameter Value Required Description
page int false Page number
per_page int false Number result to show. Default 50 result per page

Response Types

Dictionary of instrument and it's trades info, trade info fields:

JSON Field Data Type Remark
id uuid-string universal unique id of the trade.
time big-integer Trade time, unixtime in nanoseconds.
type enum-string "buy" for buy, "sell" for sell.
price float-string quote price for the base asset of the trade.
volume float-string base asset amount of the trade.
total float-string total quote value of the trade.
fee_percentage float-string percentage of the fee.
fee float-string fee value.
fee_currency string asset of the fee, in most case is the quote asset.

Getting Trading Notifications

Example: Get All Notifications

curl "https://api.bitwyre.com/private/account/notifications/trading"
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
      }"
  -X GET

Response

{
  "error": [],
  "result": [
    {
      "OrderRejected": [
        {
          "notification_message": "Notification Message OrderRejected #2",
          "timestamp": 1638408842500649920
        },
        {
          "notification_message": "Notification Message OrderRejected #1",
          "timestamp": 1638408841588082866
        }
      ],
      "OrderCancelled": [
        {
          "notification_message": "Notification Message OrderCancelled #3",
          "timestamp": 1638408842505009193
        },
        {
          "notification_message": "Notification Message OrderCancelled #2",
          "timestamp": 1638408842409370461
        },
        {
          "notification_message": "Notification Message OrderCancelled #1",
          "timestamp": 1638408842315787091
        }
      ],
      "OrderFilled": [
        {
          "notification_message": "Notification Message OrderFilled #1",
          "timestamp": 1638408841987827578
        }
      ],
      "Deposit": [
        {
          "notification_message": "Notification Message Deposit #1",
          "timestamp": 1638408842290246580
        }
      ],
      "Withdrawal": [
        {
          "notification_message": "Notification Message Withdrawal #2",
          "timestamp": 1638408842131569666
        },
        {
          "notification_message": "Notification Message Withdrawal #1",
          "timestamp": 1638408842048839032
        }
      ],
      "KYC": [
        {
          "notification_message": "Notification Message KYC #1",
          "timestamp": 1638408842230728389
        }
      ]
    }
  ]
}

Example: Get Specific Notifications

curl "https://api.bitwyre.com/private/account/notifications/trading?trading_notification_type=0?limit=2"
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
      }"
  -X GET

Response

{
  "error": [],
  "result": [
    {
      "OrderRejected": [
        {
          "notification_message": "Notification Message OrderRejected #2",
          "timestamp": 1638408842500649920
        },
        {
          "notification_message": "Notification Message OrderRejected #1",
          "timestamp": 1638408841588082866
        }
      ]
    }
  ]
}

Endpoint

https://api.bitwyre.com/private/account/notifications/trading

Request Fields/Parameters

Query Parameter Value Required Description
trading_notification_type integer False Type of notification. Default all. See Trading Notification Type
limit integer False No of notifications per type. Default `100 (max)

Response Data (Array of JSON Object)

An array of JSON object, where the keys of the object are notification type names and the values are an array of object with the following specifications.

JSON Field Data Type Remark
notification_message string Content of notification message
timestamp integer Unixtime nanosecond timestamp

Search Favorites

Search ticker, trades, and depth data of pairs in one endpoint

Request

curl "https://api.bitwyre.com/private/favorites?instruments=['btc_usdt_spot']" -X GET

Response

{
  "error": [],
  "result": {
    "favorites": [
      {
        "btc_usdt_spot": {
          "askbook": [["400.0", "2.0"]],
          "best_ask": "11000",
          "best_bid": "10075",
          "bidbook": [["310.0", "5.0"]],
          "high": "11000",
          "last": "10100",
          "last_trade_price": "10000.0",
          "last_trade_side": 1,
          "last_trade_timestamp": 1571747594573320135,
          "last_trade_uuid": "752837c7-aec6-41f8-bb07-286f859f2718",
          "last_trade_value": "20000.0",
          "last_trade_volume": "2.0",
          "low": "10000",
          "percent_change": "110.0",
          "timestamp": 1571747594573320135,
          "volume_base": "34",
          "volume_quote": "267346.0"
        }
      }
    ]
  }
}

Endpoint

https://api.bitwyre.com/private/favorites

Request Fields/Parameters

Query Parameter Data Type Required Remark
"instruments" list false Instruments of interest (eg ['btc_usdt_spot','eth_usdt_spot'])

Notes: if no instrument is specified, endpoint will return all available instrument

Response Types (JSON Object)

Returns | JSON Field | Data Type | Remark | | ---------- | --------- | -------------------------- | | error | list | Error messages, if any | | result | dictionaries | contain list of dictionaries of the data, grouped by product, market, instrument |

Please check ticker, trades, and depth endpoint documentation for explanation of the dictionary members

Convert/Instant API Endpoints

Request Convert

Request

curl "https://api.bitwyre.com/private/convert" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
          \"from_coin\": \"btc\",\
          \"size\": \"2\",\
          \"to_coin\": \"usdt\",\
          \"convert_uuid\": \"78838a5a-c5bc-4317-a47f-2481a92558ca\",\
          \"send_callback\": true,\
        }\
      }"

Response

{
  "error": [],
  "result": {
    "timestamp": 1571744594571020435,
    "message": "Convert Request Success",
    "quote_asset": "btc",
    "quote_quantity": "2",
    "base_asset": "usdt",
    "base_quantity": "60000",
    "details": "2 btc to 60,000 usdt",
    "implied_convert_price": "0.00003333333",
    "instrument": "usdt_btc_spot",
    "convert_uuid": "78838a5a-c5bc-4317-a47f-2481a92558ca",
  }
}

Create a convert request. Once this convert request is complete, it will send a POST request to the URL set in the set URL callback method below. The body of the callback request will be in this format.

POST Callback

{
  "error": [],
  "result": {
    "timestamp": 1571744594571020435,
    "message": "Convert Request Success",
    "quote_asset": "btc",
    "quote_quantity": "2",
    "base_asset": "usdt",
    "base_quantity": "60000",
    "details": "2 btc to 60,000 usdt",
    "implied_convert_price": "0.00003333333",
    "instrument": "usdt_btc_spot",
    "convert_uuid": "78838a5a-c5bc-4317-a47f-2481a92558ca",
  }
}

Endpoint

https://api.bitwyre.com/private/convert

Request Payload Fields

Payload Fields Value Required Description
from_coin string true eg. btc
to_coin string true eg. usdt
size string true convert size
convert_uuid string false convert id
send_callback string false true if want to send data to URL callback. Default true

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
timestamp integer timestamp in unix
message string conversion message
quote_asset string paid asset
quote_quantity string paid asset quantity
base_asset bool received asset
base_quantity string received asset convert quantity
details string conversion transctions details
implied_convert_price string price conversion rate
instrument string base asset, quote asset, product filter, delimited with an _ (underscore)
convert_uuid integer convert id

Convert Details

Request

curl 'https://api.bitwyre.com/private/convert?nonce=17081945&checksum=<payload_checksum>&convert_uuid=78838a5a-c5bc-4317-a47f-2481a92558ca' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": [{
    "timestamp": 1571744594571020435,
    "base_asset": "btc",
    "convert_uuid": "78838a5a-c5bc-4317-a47f-2481a92558ca",
    "quote_asset": "usdt",
    "details": "2 btc to 60,000 usdt",
    "expired": false,
    "accepted": true,
    "price": "7695.5",
    "proceeds": "384.77",
    "size": "0.05",
    "side": 2,
    "success_time": 1571744594571020435,
  }]
}

Get Convert Status

Endpoint

https://api.bitwyre.com/private/convert

Request Fields/Parameters

Query Parameter Data Type Required Remark
convert_uuid string true Convert ID

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
base_coin string base asset
quote_coin string quote asset
from_coin string from coin
to_coin string to_coint
accepted bool accepted status
price string price in units of quote_coint
proceeds string proceeds of accepting the quote in units of to_coin
size string balance in bitcoin
side string "sell" if from_coin is base_coin, otherwise "buy"
success_time integer success timestamp
timestamp integer timestamp

Convert Payment Methods

Request

curl 'https://api.bitwyre.com/private/convert/payment_methods?nonce=17081945&checksum=<payload_checksum>&type=all' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": [
    {
      "fiat": ["Credit Cards", "Banking", "Virtual Account"],
      "crypto": ["Deposit", "Withdrawal"],
    }
  ]
}

Get Convert Payment Method List

Endpoint

https://api.bitwyre.com/private/convert/payment_methods

Request Fields/Parameters

Query Parameter Data Type Required Remark
type string false Type of Asset fiat, crypto or all. Default all

Response Types (JSON Array)

JSON Field Data Type Remark
JSON-array string Returns an an array filled with payment methods

Get Asset Conversion Status

Request

curl 'https://api.bitwyre.com/private/convert/status?nonce=17081945&checksum=<payload_checksum>&convert_uuid={convert_uuid}' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "details": "1 btc to 30,000 usdt",
    "status": "Success",
    "convert_uuid": "8de70f37-c2b1-4d01-a6ba-bffc28391af4",
    "quote_asset": "btc",
    "quote_quantity": "2",
    "base_asset": "usdt",
    "base_quantity": "60000",
    "details": "2 btc to 60,000 usdt",
    "implied_convert_price": "0.00003333333",
    "instrument": "usdt_btc_spot",
  }
}

Get Convert Status Data

Endpoint

https://api.bitwyre.com/private/convert/status

Request Fields/Parameters

Query Parameter Data Type Required Remark
convert_uuid string true Convert ID

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
details string Amount details of asset conversion
status string Asset convert status
convert_uuid string Convert ID

Create Vault Convert

Request

curl "https://api.bitwyre.com/private/convert/vault" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
          \"asset\": \"btc\",\
          \"network_id\": \"BTC\",\
          \"convert_uuid\": \"78838a5a-c5bc-4317-a47f-2481a92558ca\",\
        }\
      }"

Response

{
  "error": [],
  "result": {
    "asset": "btc",
    "network_name": "Bitcoin",
    "deposit_address": "3FZbgi29cpjq2GjdwV8eyHuJJnkLtktZc5",
    "address_tag": "",
    "address_tag_name": "",
  }
}

Create Vault Convert

Endpoint

https://api.bitwyre.com/private/convert/vault

Request Fields/Parameters

Query Parameter Data Type Required Remark
asset string true Asset name
network_id string true Asset network ID
convert_uuid string true Convert ID

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
asset string Asset name
network_name string Asset network name
deposit_address string Crypto deposit address
address_tag string Address tag
address_tag_name string Address tag name

Set Deposit Callback

Request

curl "https://api.bitwyre.com/private/deposit/callback" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X PUT \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
          \"callback_url\": \"https://api.garuda.to/wallet/deposit/callback\",\
        }\
      }"

Response

{
  "error": [],
  "result": {
    "timestamp": 1571744594571020435,
    "message": "Set Deposit Callback URL to https://api.garuda.to/wallet/deposit/callback success",
  }
}

Set a convert URL callback to make sure after a deposit on a conversion request is successful, it will submit a POST request to hit this endpoint.

Endpoint

https://api.bitwyre.com/private/deposit/callback

Request Payload Fields

Payload Fields Value Required Description
callback_url string true https://api.garuda.to/wallet/deposit/callback

Set Convert Callback

Request

curl "https://api.bitwyre.com/private/convert/callback" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X PUT \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
          \"callback_url\": \"https://api.garuda.to/wallet/convert/callback\",\
        }\
      }"

Response

{
  "error": [],
  "result": {
    "timestamp": 1571744594571020435,
    "message": "Set Convert Callback URL to https://api.garuda.to/wallet/convert/callback success",
  }
}

Set a convert URL callback to make sure after a conversion request successful, it will submit a POST request to hit this endpoint.

Endpoint

https://api.bitwyre.com/private/convert/callback

Request Payload Fields

Payload Fields Value Required Description
callback_url string true https://api.garuda.to/wallet/convert/callback

Set Withdrawal Callback

Request

curl "https://api.bitwyre.com/private/withdrawal/callback" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X PUT \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
          \"callback_url\": \"https://api.garuda.to/wallet/withdrawal/callback\",\
        }\
      }"

Response

{
  "error": [],
  "result": {
    "timestamp": 1571744594571020435,
    "message": "Set Withdrawal Callback URL to https://api.garuda.to/wallet/withdrawal/callback success",
  }
}

Set a convert URL callback to make sure after a deposit on a conversion request is successful, it will submit a POST request to hit this endpoint.

Endpoint

https://api.bitwyre.com/private/withdrawal/callback

Request Payload Fields

Payload Fields Value Required Description
callback_url string true https://api.garuda.to/wallet/withdrawal/callback

Get Convert Deposit Information

Request

curl 'https://api.bitwyre.com/private/convert/vault?asset=btc&nonce=17081945&checksum=<payload_checksum>' \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "meta": {
    "has_next": true,
    "has_prev": false,
    "next_page": 2,
    "page": 1,
    "pages": 2,
    "prev_page": null,
    "total_count": 3
  },
  "result": [
    {
      "address": "tb1q8xylgnxwtj7gzsf2kd9tsxgrzkwpv4v4q0d3gw",
      "amount": "0.0001",
      "asset": "btc",
      "network_id": "BTC_TEST",
      "network_name": "Bitcoin Testnet",
      "no_of_confirmations": 1,
      "status": "Confirmed",
      "timestamp": 1662628198005000000,
      "tx_id": "afefcbcdf56dc24d71e44b716cbdc511e6a265b341c44d021d997cdf11627e70"
    },
    {
      "address": "tb1q8xylgnxwtj7gzsf2kd9tsxgrzkwpv4v4q0d3gw",
      "amount": "0.0001",
      "asset": "btc",
      "network_id": "BTC_TEST",
      "network_name": "Bitcoin Testnet",
      "no_of_confirmations": 1,
      "status": "Confirmed",
      "timestamp": 1662603131619000000,
      "tx_id": "a8d8219490fe6a45bd8499084efc2e1b9ecc3380cabf04259d53b13119ebcd36"
    }
  ]
}

Get Convert Deposit Info

Endpoint

https://api.bitwyre.com/private/convert/vault

Request Fields/Parameters

Query Parameter Data Type Required Remark
asset string true Asset crypto
network_id string false Asset crypto network ID. Default all
convert_uuid string false Convert ID. Default all
address string false Asset crypto address destination. Default all
tx_id string false Asset crypto transaction ID/hash. Default all
page int false Displayed result page number. Default 1
per_page int false Number of displayed result per page. Default 50

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
address string Asset crypto address
amount string Amount of deposited asset
asset string Asset crypto
network_id string Asset crypto network ID
network_name string Asset crypto network name
no_of_confirmations int No of transaction network confirmations
status string Status of asset transaction
timestamp int Timestamp in unix
tx_id string Asset crypto transaction ID/hash

Custodian API Endpoints

Creating a New Crypto Withdrawal Request

curl "https://api.bitwyre.com/private/account/withdrawal/crypto" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
    \"nonce\": 17081945,\
    \"checksum\": \"somechecksum\",\
    \"payload\": {\
      \"asset\": \"btc\",\
      \"amount\": \"1\",\
      \"address\": \"12dRugNcdxK39288NjcDV4GX7rMsKCGn6B\",\
      \"network_id\": \"BTC\",\
      \"notes\": \"Buying new shoes\"\
    }\
  }"

Response

{
  "error": [],
  "result": {
    "withdrawal": {
      "btc": [
        {
          "fee": "to-be-determined",
          "gross_amount": "to-be-determined",
          "id": "f98c7277-881a-46f8-a260-99c626619c2f",
          "nett_amount": "1.0",
          "network_confirmation": 0,
          "network_id": "BTC",
          "network_name": "Bitcoin",
          "provider": "hot",
          "status": "Pending",
          "submit_time": 1617971125374549000,
          "success_time": 0,
          "tx_id": "",
          "type": "crypto",
          "verification_uuid": "db6547d6-dc9e-404f-982f-75cc2fa7b919"
        }
      ]
    }
  }
}

Creates a new withdrawal request for a given asset with the given amount.

A confirmation email will be sent and contains instruction on how to confirm the withdrawal request.

The transaction will not be processed before a confirmation is conducted.

Endpoint

https://api.bitwyre.com/private/account/withdrawal/crypto

Request Fields/Parameters

JSON Field Value Required Description
asset string true Asset to withdraw.
amount string true Amount to withdraw.
address string true Destination address.
network_id string true Network of Destination address.
notes string false Optional annotation, e.g. "Buying new shoes".

Response Data

See Response Asset Statement Object.

Verify Crypto Withdrawal Request

curl "https://api.bitwyre.com/private/account/withdrawal/crypto/verify/65792f1b-a4b5-4b41-befd-f1e5bb8815ef/4cd1ff2d-cda0-4e9f-b1d5-2b59f1b17154?nonce=17081945&checksum=<payload_checksum>&payload=" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "withdrawal_verified": [
      {
        "id": "65792f1b-a4b5-4b41-befd-f1e5bb8815ef",
        "transaction_uuid": "4cd1ff2d-cda0-4e9f-b1d5-2b59f1b17154",
        "is_verified": 1
      }
    ]
  }
}

Confirms that the crypto withdrawal requeset is verified.

Endpoint

https://api.bitwyre.com/private/account/withdrawal/crypto/verify/:withdrawal_id/:verification_uuid

Request Fields/Parameters

Path Parameter Value Required Description
"withdrawal_id" uuid-string true specific withdrawal_id to get info from. If specified as all it will return all crypto withdrawal request statuses
"verification_uuid" uuid-string true specific verification_uuid to verified withdrawal request

Getting a Crypto Withdrawal Request Status

curl "https://api.bitwyre.com/private/account/withdrawal/crypto/btc/65792f1b-a4b5-4b41-befd-f1e5bb8815ef?nonce=17081945&checksum=<payload_checksum>&payload=&page=1&per_page=1" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "withdrawal": {
      "btc": [
        {
          "asset": "btc",
          "fee": "0",
          "gross_amount": "1.0",
          "id": "65792f1b-a4b5-4b41-befd-f1e5bb8815ef",
          "is_verified": 0,
          "nett_amount": "100000000",
          "network_confirmation": 0,
          "network_id": "BTC",
          "network_name": "Bitcoin",
          "provider": "",
          "status": "Pending",
          "submit_time": 1617974544503655000,
          "success_time": 0,
          "tx_id": "",
          "tx_hash_url": "",
          "verification_uuid": "3b577d3e-8e15-4ff9-aee6-4e95c3042a05",
          "withdrawal_type": "crypto"
        }
      ]
    }
  },
  "meta": {
    "has_next": true,
    "has_prev": false,
    "next_page": 2,
    "page": 1,
    "pages": 5,
    "prev_page": null,
    "total_count": 5
  }
}

Retrieves a withdrawal request's details.

Endpoint

https://api.bitwyre.com/private/account/withdrawal/crypto/:asset/:withdrawal_id

Request Fields/Parameters

Path Parameter Value Required Description
asset string true Crypto asset, e.g btc, bch.
withdrawal_id uuid-string true specific withdrawal_id to get info from. If specified as all it will return all crypto withdrawal request statuses
Parameter Value Required Description
page int false Page number
per_page int false Number result to show. Default 50 result per page

Creating a New Fiat Withdrawal Request

curl "https://api.bitwyre.com/private/account/withdrawal/fiat" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
    \"nonce\": 17081945,\
    \"checksum\": \"somechecksum\",\
    \"payload\": {\
      \"asset\": \"usdt\",\
      \"amount\": \"15000000\",\
      \"notes\": \"Buying a new computer\"\
      \"address\": \"An address\"\
    }\
  }"

Response

{
  "error": [],
  "result": {
    "withdrawal": {
      "idr": [
        {
          "centralized_confirmation": 0,
          "fee": "to-be-determined",
          "gross_amount": "1000.0",
          "id": "9a149eae-be9e-49f4-b209-6b333a19659e",
          "nett_amount": "to-be-determined",
          "provider": "",
          "status": "pending",
          "submit_time": 1618207558621551000,
          "success_time": 0,
          "tx_id": "",
          "type": "fiat",
          "verification_uuid": "3af17d81-499d-496e-b2cf-8b061ad63735"
        }
      ]
    }
  }
}

Creates a new withdrawal request for a given asset with the given amount.

A confirmation email will be sent and contains instruction on how to confirm the withdrawal request.

The transaction will not be processed before a confirmation is conducted.

Endpoint

https://api.bitwyre.com/private/account/withdrawal/fiat

Request Fields/Parameters

JSON Field Value Required Description
asset string true Asset to withdraw.
amount string true Amount to withdraw.
address string true Address to transfer.
notes string false Optional annotation, e.g. "Buying new shoes".

Response Data

See Banking Details.

Verify Fiat Withdrawal Request

curl "https://api.bitwyre.com/private/account/withdrawal/fiat/verify/65792f1b-a4b5-4b41-befd-f1e5bb8815ef/4cd1ff2d-cda0-4e9f-b1d5-2b59f1b17154?nonce=17081945&checksum=<payload_checksum>&payload=" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "withdrawal_verified": [
      {
        "id": "65792f1b-a4b5-4b41-befd-f1e5bb8815ef",
        "transaction_uuid": "4cd1ff2d-cda0-4e9f-b1d5-2b59f1b17154",
        "is_verified": 1
      }
    ]
  }
}

Confirms that the fiat withdrawal requeset is verified.

Endpoint

https://api.bitwyre.com/private/account/withdrawal/fiat/verify/:withdrawal_id/:verification_uuid

Request Fields/Parameters

Path Parameter Value Required Description
"withdrawal_id" uuid-string true specific withdrawal_id to get info from. If specified as all it will return all crypto withdrawal request statuses
"verification_uuid" uuid-string true specific verification_uuid to verified withdrawal request

Getting a Fiat Withdrawal Request Status

curl "https://api.bitwyre.com/private/account/withdrawal/fiat/idr/65792f1b-a4b5-4b41-befd-f1e5bb8815ef?nonce=17081945&checksum=<payload_checksum>&payload=?age=1&per_page=1" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "withdrawal": {
      "idr": [
        {
          "id": "073ba6e5-24d2-4532-8b02-58c1d7a104be",
          "tx_id": "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16",
          "status": "pending",
          "type": "fiat",
          "provider": "bitwyre_bank",
          "gross_amount": "15000000",
          "fee": "0.001",
          "nett_amount": "14990000",
          "centralized_confirmation": true,
          "submit_time": 1571747594573320135,
          "success_time": null
        }
      ]
    }
  },
  "meta": {
    "has_next": true,
    "has_prev": false,
    "next_page": 2,
    "page": 1,
    "pages": 5,
    "prev_page": null,
    "total_count": 5
  }
}

Retrieves a withdrawal request's details.

Endpoint

https://api.bitwyre.com/private/account/withdrawal/fiat/:asset/:withdrawal_id

Request Fields/Parameters

Path Parameter Value Required Description
"asset" string true Fiat asset, e.g idr, usdt.
"withdrawal_id" uuid-string true specific withdrawal_id to get info from. If specified as all it will return all fiat withdrawal requests
Parameter Value Required Description
page int false Page number
per_page int false Number result to show. Default 50 result per page

Response Data

See Response Asset Statement Object.

Getting a New Crypto Deposit Address

curl "https://api.bitwyre.com/private/account/deposit/crypto" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
    \"nonce\": 17081945,\
    \"checksum\": \"somechecksum\",\
    \"payload\": {\
      \"asset\": \"xlm\",\
      \"network_id\": \"XLM\"\
    }\
  }"

Response

{
  "error": [],
  "result": {
    "deposit": {
      "xlm": [
        {
          "address": "GDRL4HRBJDRHDIJCKX6FB5UNB4KAQINZAJR7L6R3UFKM45BT5KKJ7NCI",
          "address_tag": "3267106239",
          "address_tag_name": "Memo",
        }
      ]
    }
  }
}

Gets a new deposit address for a given asset.

Endpoint

https://api.bitwyre.com/private/account/deposit/crypto

Request Fields/Parameters

JSON Field Value Required Description
asset string true Asset to get a deposit deposit address for.
network_id string false Asset network to get a deposit deposit address for. Default main

Getting a Crypto Deposit Address' History

curl "https://api.bitwyre.com/private/account/deposit/crypto/btc/3MzqqLdsYA7mL7re49JMLHJUjbFQ5RHHc6?nonce=17081945&checksum=<payload_checksum>&payload=&page=1&per_page=1" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "deposit": {
      "3MzqqLdsYA7mL7re49JMLHJUjbFQ5RHHc6": [
        {
          "id": "4b6dc35a-ab03-4f55-bb81-8efb5a8569e0",
          "tx_id": "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16",
          "status": "success",
          "type": "crypto",
          "provider": "warm",
          "gross_amount": "150.00",
          "fee": "0.1",
          "nett_amount": "149.9",
          "network_id": "BTC",
          "network_name": "Bitcoin",
          "network_confirmation": 4,
          "submit_time": 1571747594573320135,
          "success_time": 1571747594573320135,
          "url": "https://live.blockcypher.com/btc-testnet/tx/f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16/"
        }
      ]
    }
  },
  "meta": {
    "has_next": true,
    "has_prev": false,
    "next_page": 2,
    "page": 1,
    "pages": 5,
    "prev_page": null,
    "total_count": 5
  }
}

Gets a crypto deposit address' transaction history.

Basically this is a subset operation of Getting Account Statement.

Endpoint

https://api.bitwyre.com/private/account/deposit/crypto/:asset/:address

Request Fields/Parameters

Path Parameter Value Required Description
asset string true Crypto asset, e.g btc.
address string true Crypto deposit address. If specified as all it will return all crypto deposit history
Parameter Value Required Description
page int false Page number
per_page int false Number result to show. Default 50 result per page

Getting a New Fiat Deposit Address

curl "https://api.bitwyre.com/private/account/deposit/fiat/all" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X GET

Response

{
  "error": [],
  "result": {
    "idr": {
      "Bank Transfer": [
        {
          "account": "1079026031",
          "bank": "PT Artha Graha International Tbk",
          "bank_address": "Kawasan Niaga Terpadu Sudirman (SCBD) Jl. Jend. Sudirman Kav. 52 - 53 Jakarta Selatan 12190, Indonesia",
          "city": "Jakarta",
          "country": "Republic of Indonesia",
          "currency": "idr",
          "is_enabled": 1,
          "is_gateway": 0,
          "name": "Artha Graha International",
          "notes": "US Citizens are prohibited from sending wires in USD for trading. If we find out have the right to return the money and cancel all trades.",
          "provider": "Bitwyre",
          "routing_number": "",
          "swift_code": "ARTGIDJAXXX"
        },
        {
          "currency": "idr",
          "is_enabled": true,
          "is_gateway": true,
          "minimum_deposit_amount": "0",
          "payment_category": "Credit Card",
          "payment_merchant": "",
          "provider": "MKP"
        },
        {
          "currency": "idr",
          "is_enabled": false,
          "is_gateway": true,
          "minimum_deposit_amount": "10000",
          "payment_category": "Virtual Account",
          "payment_merchant": "BNI",
          "provider": "MKP"
        },
        {
          "currency": "idr",
          "is_enabled": false,
          "is_gateway": true,
          "minimum_deposit_amount": "10000",
          "payment_category": "Virtual Account",
          "payment_merchant": "Mandiri",
          "provider": "MKP"
        },
        {
          "currency": "idr",
          "is_enabled": false,
          "is_gateway": true,
          "minimum_deposit_amount": "10000",
          "payment_category": "Virtual Account",
          "payment_merchant": "Permata",
          "provider": "MKP"
        },
        {
          "currency": "idr",
          "is_enabled": false,
          "is_gateway": true,
          "minimum_deposit_amount": "10000",
          "payment_category": "Virtual Account",
          "payment_merchant": "CIMB",
          "provider": "MKP"
        },
        {
          "currency": "idr",
          "is_enabled": false,
          "is_gateway": true,
          "minimum_deposit_amount": "10000",
          "payment_category": "Virtual Account",
          "payment_merchant": "BRI",
          "provider": "MKP"
        },
        {
          "currency": "idr",
          "is_enabled": false,
          "is_gateway": true,
          "minimum_deposit_amount": "10000",
          "payment_category": "Virtual Account",
          "payment_merchant": "Finpay",
          "provider": "MKP"
        },
      ],
      "E-Money": [
        {
          "account": "",
          "bank": "PT Espay Debit Indonesia Koe",
          "bank_address": "",
          "city": "Jakarta",
          "country": "Republic of Indonesia",
          "currency": "idr",
          "is_enabled": 0,
          "is_gateway": 1,
          "name": "Dana Indonesia",
          "notes": "US Citizens are prohibited from sending wires in USD for trading. If we find out have the right to return the money and cancel all trades.",
          "payment_gateway_address": "Capital Place fl.18, Jl. Gatot Subroto, RT.6/RW.1, Kuningan Bar., Kec. Mampang Prpt., Kota Jakarta Selatan, Daerah Khusus Ibukota Jakarta 12790",
          "provider": "DANA",
          "routing_number": "",
          "swift_code": ""
        },
      ],
      "QRIS": [
        {
          "currency": "idr",
          "is_enabled": false,
          "is_gateway": true,
          "minimum_deposit_amount": "0",
          "payment_category": "QRIS",
          "payment_merchant": "",
          "provider": "MKP"
        },
      ],
    },
  }
}

Gets a new deposit address for a given asset

Endpoint

https://api.bitwyre.com/private/account/deposit/fiat/<asset>

Request Fields/Parameters

JSON Field Value Required Description
asset string true Asset to get a deposit address for e.g. USD, IDR, if ALL then return every deposit address

Creating a New Fiat Deposit Request

Request (MKP VA)

curl "https://api.bitwyre.com/private/account/deposit/fiat/request" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
    \"nonce\": 17081945,\
    \"checksum\": \"somechecksum\",\
    \"payload\": {\
      \"asset\": \"idr\",\
      \"amount\": \"100000\",\
      \"provider\": \"MKP\",\
      \"data\": {\
        \"payment_category\": \"Virtual Account\",\
        \"payment_merchant\": \"CIMB\",\
      }\
    }\
  }"

Response (MKP VA)

{
  "error": [],
  "result": {
      "data": {
      "asset": "idr",
      "confirmed_status": "Unconfirmed",
      "created_at": "2022-11-11 11:24:24",
      "expired_at": "2022-11-12 11:24:24",
      "fee": 0,
      "gross_amount": 10000,
      "nett_amount": 10000,
      "status": "Pending",
      "submit_time": 1668140665352539000,
      "time_limit": "1440",
      "transaction_id": "352139ea-434b-473d-872c-eb72e343dcb7",
      "va_code": "5489079498487726"
    },
    "message": "Successfully created a deposit transaction via Credit Card",
    "success": true,
    "timestamp": "2022-11-11T11:24:25+00:00"
  }
}

Request (MKP CC)

curl "https://api.bitwyre.com/private/account/deposit/fiat/request" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
    \"nonce\": 17081945,\
    \"checksum\": \"somechecksum\",\
    \"payload\": {\
      \"asset\": \"idr\",\
      \"amount\": \"100000\",\
      \"provider\": \"MKP\",\
      \"data\": {\
        \"payment_category\": \"Credit Card\",\
      }\
    }\
  }"

Response (MKP CC)

{
  "error": [],
  "result": {
      "data": {
      "asset": "idr",
      "confirmed_status": "Unconfirmed",
      "created_at": "2022-11-11 11:16:26",
      "expired_at": "2022-11-12 11:16:26",
      "fee": 0,
      "gross_amount": 10000,
      "nett_amount": 10000,
      "payment_url": "https://tokenize-staging.mcpayment.id/?eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZWdpc3Rlcl9pZCI6IkEyUC1DQzIwMjIxMTExMTExNjI3LTA5MzciLCJjYWxsYmFja191cmwiOiJodHRwOi8vMTQ5LjEyOS4yNDguMjUyOjE4MDAxL3B1cmNoYXNlL2NjL2NhbGxiYWNrcGF5bWVudCIsIm1lcmNoYW50X2lkIjoibWtwbW9iaWxlIiwidG9rZW5pemUiOnRydWUsInRyYW5zYWN0aW9uIjp7ImFtb3VudCI6MTAwMDAsImRlc2NyaXB0aW9uIjoiTUFOVUFMIElOUVVJUlkgT1RFIC0gQ0MifSwiaXNfdG9rZW5pemUiOnRydWUsInJldHVybl91cmwiOiJodHRwczovL2FwaS5iaXR3eXJlLmlkL21rcC9jYWxsYmFjay90cmFuc2FjdGlvbi11cGRhdGUvT1RFXzIwMjItMTEtMTFUMTE6MTY6MjZfQ0NfMTAwMDBfMzUyMTM5ZWEtNDM0Yi00NzNkLTg3MmMtZWI3MmUzNDNkY2I3IiwiaWF0IjoxNjY4MTQwMTg3LCJleHAiOjE2NjgxNDM3ODd9.IjacOqy5ZMm3nO26c6X8XbuX2AKhYJu1XbH_3z5Bhnw",
      "status": "Pending",
      "submit_time": 1668140187648069000,
      "time_limit": "1440",
      "transaction_id": "352139ea-434b-473d-872c-eb72e343dcb7"
    },
    "message": "Successfully created a deposit transaction via Credit Card",
    "success": true,
    "timestamp": "2022-11-11T11:16:27+00:00"
  }
}

Request (MKP QRIS)

curl "https://api.bitwyre.com/private/account/deposit/fiat/request" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
    \"nonce\": 17081945,\
    \"checksum\": \"somechecksum\",\
    \"payload\": {\
      \"asset\": \"idr\",\
      \"amount\": \"100000\",\
      \"provider\": \"MKP\",\
      \"data\": {\
        \"payment_category\": \"QRIS\",\
      }\
    }\
  }"

Response (MKP QRIS)

{
  "error": [],
  "result": {
    "data": {
      "asset": "idr",
      "confirmed_status": "Unconfirmed",
      "created_at": "2022-11-11 10:59:19",
      "expired_at": "",
      "fee": 0,
      "gross_amount": 10000,
      "nett_amount": 10000,
      "qr_code": "00020101021226530012COM.DOKU.WWW0118936008990000003163020431630303UBE51440014ID.CO.QRIS.WWW0215ID20210591722820303UBE520465335303360540810000.005802ID5908Apps2Pay6008SEMARANG61055012662470703A015036MKP-mkpapps2pay-202211111059000000066304DFBB",
      "status": "Pending",
      "submit_time": 1668139161566157000,
      "time_limit": "",
      "transaction_id": "3c2e68ee-2be9-4d56-8b5a-04d01bbe87ca"
    },
    "message": "Successfully created a deposit transaction via QRIS",
    "success": true,
    "timestamp": "2022-11-11T10:59:21+00:00"
  }
}

Creates a new deposit request for a given fiat asset with the given amount.

Endpoint

https://api.bitwyre.com/private/account/deposit/fiat/request

Request Fields/Parameters

JSON Field Value Required Description
asset string true Fiat Asset to deposit.
amount string true Amount to deposit.
provider string true Service Provider.
data object false Payment method data

Response Data

JSON Field Data Type Remark
message string Request success message
success boolean true if request is success
timestamp string Request timestamp
data object Deposit transaction details data

Getting a Fiat Deposit Address' History

curl "https://api.bitwyre.com/private/account/deposit/fiat/idr/address?nonce=17081945&checksum=<payload_checksum>&payload=&page=1&per_page=1" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "deposit": {
      "address": [
        {
          "centralized_confirmation": 0,
          "fee": "0",
          "gross_amount": "0",
          "id": "9927e7e9-c6d0-43ad-9443-8bb6b56ce1fb",
          "nett_amount": "0",
          "provider": "",
          "status": "pending",
          "submit_time": 0,
          "success_time": 0,
          "tx_id": "9927e7e9-c6d0-43ad-9443-8bb6b56ce1fb",
          "type": "fiat"
        }
      ]
    }
  },
  "meta": {
    "has_next": true,
    "has_prev": false,
    "next_page": 2,
    "page": 1,
    "pages": 5,
    "prev_page": null,
    "total_count": 5
  }
}

Gets a fiat deposit address' transaction history.

Basically this is a subset operation of Getting Account Statement.

Endpoint

https://api.bitwyre.com/private/account/deposit/fiat/:asset/:address

Request Fields/Parameters

Path Parameter Value Required Description
asset string true Fiat asset, e.g idr.
address string true Fiat deposit address. If specified as `all it will return all fiat deposit history
Parameter Value Required Description
page int false Page number
per_page int false Number result to show. Default 50 result per page

Cancel Pending Crypto Withdrawal

curl "https://api.bitwyre.com/private/account/withdrawal/crypto/btc/fd15191a-7fe5-406d-91e8-fdfcb9476234?nonce=17081945&checksum=<payload_checksum>&payload="
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X DELETE

Response

{
  "error": [],
  "result": {
    "withdrawal": {
      "btc": [
        {
          "id": "073ba6e5-24d2-4532-8b02-58c1d7a104be",
          "status": "Cancelled",
          "submit_time": 1571747594573320135,
          "success_time": 1571747594573321111
        }
      ]
    }
  }
}

We conduct crypto withdrawal transfers 4 times a day 6:00 Jakarta/WIB, 12:00 Jakarta/WIB, 18:00 Jakarta/WIB, 00:00 Jakarta/WIB. A cancel pending withdrawal for crypto operation can only be done 1 hour before those designated withdrawal times.

For example, for the withdrawal batch of 6:00 Jakarta/WIB, the cancel time window closes on 5:00 Jakarta/WIB.

Any attempt to cancel a withdrawal after the cancel time window is rejected and will be returned a status of "cancel rejected" and be automatically processed on the next batch.

Endpoint

https://api.bitwyre.com/private/account/withdrawal/crypto/:crypto/:withdrawal_id

Request Fields/Parameters

Path Parameter Value Required Description
withdrawal_id String True Withdrawal pending UUID. If specified as `all it cancel all pending withdrawals

Response Data

JSON Field Data Type Remark
id string UUID of pending request
status string Cancel Success/Cancel Rejected
submit_time integer-timestamp Nanosecond timestamp of submit time
success_time integer-timestamp Nanosecond timesamp of success time, null on cancel rejecteed

Cancel Pending Fiat Withdrawal

curl "https://api.bitwyre.com/private/account/withdrawal/fiat/usdt/fd15191a-7fe5-406d-91e8-fdfcb9476234?nonce=17081945&checksum=<payload_checksum>&payload="
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X DELETE

Response

{
  "error": [],
  "result": {
    "withdrawal": {
      "usdt": [
        {
          "id": "073ba6e5-24d2-4532-8b02-58c1d7a104be",
          "status": "Cancelled",
          "submit_time": 1571747594573320135,
          "success_time": 1571747594573321111
        }
      ]
    }
  }
}

We conduct fiat withdrawal transfers 1 time a day 9:00 Jakarta/WIB. A cancel pending withdrawal for fiat operation can only be done 24 hours before those designated withdrawal times.

For example, for the withdrawal batch of 9:00 Jakarta/WIB, the cancel time window closes on 8:59 Jakarta/WIB the previous day

Any attempt to cancel a withdrawal after the cancel time window is rejected and will be returned a status of "cancel rejected" and be automatically processed on the next batch.

Endpoint

https://api.bitwyre.com/private/account/withdrawal/fiat/:fiat/:withdrawal_id

Request Fields/Parameters

Path Parameter Value Required Description
withdrawal_id String True Withdrawal pending UUID. If specified as `all it cancel all pending withdrawals

Response Data

JSON Field Data Type Remark
id string UUID of pending request
status string Cancel Success/Cancel Rejected
submit_time integer-timestamp Nanosecond timestamp of submit time
success_time integer-timestamp Nanosecond timesamp of success time, null on Cancel rejecteed

Getting Crypto Withdrawal Addresses

curl "https://api.bitwyre.com/private/account/withdrawal/crypto/address"
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X GET

Response

{
  "error": [],
  "result": {
    "btc": [
      {
        "address": "3FZbgi29cpjq2GjdwV8eyHuJJnkLtktZc5",
        "address_name": "mybtcaddress1",
        "address_tag": "",
        "created_at": "30/07/2021, 00:00:00"
      }
    ],
    "eth": [
      {
        "address": "0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7",
        "address_name": "myethaddress1",
        "address_tag": "",
        "created_at": "30/07/2021, 00:00:00"
      }
    ]
  }
}

Response If User have no existing addresses

{
  "error": ["No addresses found yet. Please insert and confirm to list one."],
  "result": []
}

Return all user's existing and verified crypto withdrawal addresses

Endpoint

https://api.bitwyre.com/private/account/withdrawal/crypto/address

Request Fields/Parameters

Because this is a GET endpoint, nonce & checksum are query parameters, also payload should be always an empty string. The SHA256 steps for this endpoint's payload:

  1. jsonify an empty string.
  2. then SHA256 from above result.

Please refer to Authentication.

Response Data

JSON Field Data Type Remark
asset string Crypto asset
address string Crypto address
address_name string Address name
address_tag string Address tag
created_at string Datetime of address creation

Add Crypto Withdrawal Address

curl "https://api.bitwyre.com/private/account/withdrawal/crypto/address"
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
            \"asset\": \"btc\",\
            \"address\": \"3FZbgi29cpjq2GjdwV8eyHuJJnkLtktZc5\",\
            \"address_name\": \"mybtcaddress1\",\
            \"address_tag\": \"tagaddress\",\
            \"network_id\": \"BTC\",\
      }"
  -X PUT

Response if Success

{
  "error": [],
  "result": {
    "message": "Successfully add network BTC withdrawal address 3FZbgi29cpjq2GjdwV8eyHuJJnkLtktZc5",
    "success": 1,
    "timestamp": 1627473142470220000
  }
}

Response if a duplicate address was inserted

{
  "error": ["You are inserting a duplicate address that has been confirmed"],
  "result": {}
}

Add a crypto withdrawal address for the user

Endpoint

https://api.bitwyre.com/private/account/withdrawal/crypto/address

Request Fields/Parameters

JSON Field Value Required Description
asset string True crypto asset
address string True crypto address
address_name string True address name
address_tag string False address tag
network_id string False crypto network

Response Data

JSON Field Data Type Remark
message string response message
success integer return 1 if the operation success
timestamp integer Nanosecond timestamp

Remove Crypto Withdrawal Address

curl "https://api.bitwyre.com/private/account/withdrawal/crypto/address"
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
            \"asset\": \"btc\",\
            \"address\": \"3FZbgi29cpjq2GjdwV8eyHuJJnkLtktZc5\",\
            \"network_id\": \"BTC\",\

      }"
  -X DELETE

Response if Success

{
  "error": [],
  "result": {
    "message": "Successfully remove network BTC withdrawal address 3FZbgi29cpjq2GjdwV8eyHuJJnkLtktZc5",
    "success": 1,
    "timestamp": 1627473142470220000
  }
}

Response if the address was already deleted

{
  "error": ["You have deleted your address, you cannot use it anymore"],
  "result": {}
}

Remove a crypto withdrawal address for the user

Endpoint

https://api.bitwyre.com/private/account/withdrawal/crypto/address

Request Fields/Parameters

JSON Field Value Required Description
asset string True crypto asset
address string True crypto address
network_id string False crypto network

Response Data

JSON Field Data Type Remark
message string response message
success integer return 1 if the operation success
timestamp integer Nanosecond timestamp

Verify Crypto Withdrawal Address

curl "https://api.bitwyre.com/private/account/withdrawal/crypto/address"
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
            \"asset\": \"btc\",\
            \"address\": \"3FZbgi29cpjq2GjdwV8eyHuJJnkLtktZc5\",\
            \"withdrawal_confirmation_uuid\": \"c2025d42-e0c6-47a4-9f0f-bdc627983163\",\
            \"network_id\": \"BTC\",\

      }"
  -X POST

Response if Success

{
  "error": [],
  "result": {
    "message": "Successfully verify network BTC withdrawal address 3FZbgi29cpjq2GjdwV8eyHuJJnkLtktZc5",
    "success": 1,
    "timestamp": 1627473142470220000
  }
}

Response if the address was already verified

{
  "error": ["You have already confirmed the address"],
  "result": {}
}

Response if wrong withdrawal confirmation uuid was inserted.

{
  "error": ["Wrong withdrawal confirmation code"],
  "result": {}
}

Verify a crypto withdrawal address for the user

Endpoint

https://api.bitwyre.com/private/account/withdrawal/crypto/address

Request Fields/Parameters

JSON Field Value Required Description
asset string True crypto asset
address string True crypto address
withdrawal_confirmation_uuid string True withdrawal address confirmation uuid
network_id string False crypto network

Response Data

JSON Field Data Type Remark
message string response message
success integer return 1 if the operation success
timestamp integer Nanosecond timestamp

Resend Verification Crypto Withdrawal Address

curl "https://api.bitwyre.com/private/account/withdrawal/crypto/address"
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
            \"asset\": \"btc\",\
            \"address\": \"3FZbgi29cpjq2GjdwV8eyHuJJnkLtktZc5\",\
      }"
  -X PATCH

Response if Success

{
  "error": [],
  "result": {
    "message": "Successfully resend verification code for btc withdrawal address 3FZbgi29cpjq2GjdwV8eyHuJJnkLtktZc5",
    "success": 1,
    "timestamp": 1627473142470220000
  }
}

Response if the address was already verified

{
  "error": ["You have already confirmed the address"],
  "result": {}
}

Response if wrong address was inserted.

{
  "error": ["Address is not found. Please add the address first."],
  "result": {}
}

Resend the verification code for a crypto withdrawal address to the user via e-mail.

Endpoint

https://api.bitwyre.com/private/account/withdrawal/crypto/address

Request Fields/Parameters

JSON Field Value Required Description
asset string True crypto asset
address string True crypto address

Response Data

JSON Field Data Type Remark
message string response message
success integer return 1 if the operation success
timestamp integer Nanosecond timestamp

Getting Banking Details

curl "https://api.bitwyre.com/private/account/banking/get/<asset>?nonce=17081945&checksum=<payload_checksum>&payload="
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "account_nickname": "Nakamoto Chase Account",
    "asset": "idr",
    "bank_account": 123456,
    "bank_account_name": "Satoshi Nakamoto",
    "bank_name": "JP Morgan Chase",
    "details": "routing code XXXXX",
    "id": "1d987421-e850-4efe-85a8-30efb9665c2f",
    "swift_code": "CHASUSXX"
  }
}

Endpoint

https://api.bitwyre.com/private/account/banking/get

Request Fields/Parameters

Parameter asset to get its associated bank detail, use all to query all asset bank detail Because this is a GET endpoint, nonce & checksum are query parameters, also payload should be always an empty string. The SHA256 steps for this endpoint's payload:

  1. jsonify an empty string.
  2. then SHA256 from above result.

Please refer to Authentication.

Setting Banking Details

curl "https://api.bitwyre.com/private/account/banking/post"
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
          \"bank_name\": \"JP Morgan Chase\",\
          \"swift_code\": \"CHASUSXX\",\
          \"bank_account\": \"xxxxxxxxxxx\",\
          \"bank_account_name\": \"Satoshi Nakamoto\",\
          \"address\": \"23 Embarcadero Road, California, USA\",
          \"details\": \"routing code XXXXX\"\
          \"account_nickname\": \"Nakamoto Chase Account\",
          \"asset\": \"idr\",
        }\
      }"

Response

{
  "error": [],
  "result": {
    "result": true
  }
}

Endpoint

https://api.bitwyre.com/private/account/banking

Request Fields/Parameters

JSON Field Value Required Description
bank_name The bank name True The bank name designated for deposit/withdrawal
swift_code The bank SWIFT code True The bank's SWIFT code
bank_account The bank account number or IBAN True The designated deposit/withdrawal bank account number or IBAN
bank_account_name The bank account owner's name True The customer's name according to KYC/AML details
address The address of the customer True The customer's address according to KYC/AML details
details Other details to ease the process of transfer True The banking specific details needed to conduct the transfer that are country specific
account_nickname The nickname for this banking account False The customer's preference nickname for the account
asset Asset name True The Asset to be associated with the bank account

Response Data

JSON Field Data Type Remark
id string-uuid the UUID of the insertion

Getting List of Deposit Payment Gateways

curl "https://api.bitwyre.com/private/account/deposit/gateway?nonce=17081945&checksum=<payload_checksum>&payload={\"asset\": \"usdt\"}"
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "payment_gateway_name": "IDR Dana",
    "url_payment": "https://dana.id/payment/id=xxxxxxxxx",
    "url_callback": "https://api.bitwyre.com/private/account/gateway/callback"
  }
}

Endpoint

https://api.bitwyre.com/private/account/deposit/gateway

Request Fields/Parameters

JSON Field Value Required Description
"asset" string true Fiat asset for e.g. USD, IDR

Response Data

JSON Field Data Type Remark
payment_gateway_name string payment gateway name
url_payment string-url URL to be redirected for payment gateway
url_callback string-url URL to get callback after payment gateway operation finished

Getting List of Withdrawal Payment Gateways

curl "https://api.bitwyre.com/private/account/withdrawal/gateway?nonce=17081945&checksum=<payload_checksum>&payload={\"asset\": \"idr\"}"
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "payment_gateway_name": "IDR Duitku",
    "url_payment": "https://dana.id/payment/id=xxxxxxxxx",
    "url_callback": "https://api.bitwyre.com/private/account/withdrawal/callback"
  }
}

Endpoint

https://api.bitwyre.com/private/account/withdrawal/gateway

Request Fields/Parameters

JSON Field Value Required Description
"asset" string true Fiat asset for e.g. USD, IDR

Response Data

JSON Field Data Type Remark
payment_gateway_name string payment gateway name
url_payment string-url URL to be redirected for payment gateway
url_callback string-url URL to get callback after payment gateway operation finished

Know Your Customer (KYC)/Anti-Money Laundering (AML) API Endpoints

Get KYC Data Status

Request

curl "https://api.bitwyre.com/private/account/kyc-data/status" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X GET \
  -d "{\
    \"nonce\": 17081945,\
    \"checksum\": \"somechecksum\",\
  }"

Response

{
  "error": [],
  "result": {
    "identity_card_back_scan_uuid": "",
    "identity_card_front_scan_uuid": "4f55ab02-a3a6-40cb-8f9c-35761fd4506a",
    "rejection_reason": "",
    "selfie_photo_uuid": "b2b92db4-31ec-4e5e-944a-2e6b7f6aeef8",
    "status": "Pending"
  }
}

Get user KYC Data status.

Endpoint

https://api.bitwyre.com/private/account/kyc-data/status

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
identity_card_back_scan_uuid string uuid of user id card scan (back side)
identity_card_front_scan_uuid string uuid of user id card scan (front side)
rejection_reason string reason of rejection if status is Rejected
selfie_photo_uuid string uuid of user selfie photo
status string user kyc data status

Submit KYC Data

Request

curl "https://api.bitwyre.com/private/account/kyc-data" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
    \"nonce\": 17081945,\
    \"checksum\": \"somechecksum\",\
    \"payload\": {\
      \"name\": \"Test User\",\
      \"address\": \"Jalan Pegangsaan Timur Nomor 56\",\
      \"id_card_type\": 0,\
      \"id_card_number\": \"AB12345\",\
      \"id_card_country_code\": \"id\",\
    },\
  }"

Response

{
  "error": [],
  "result": {
    "success": true,
    "message": "Successfully insert kyc data for user be327dcb-c21b-4d4f-944d-3cf1bf297222"
  }
}

Submit User KYC Data by user.

Endpoint

https://api.bitwyre.com/private/account/kyc-data

Request Fields/Parameters

Payload Fields Value Required Description
name string true full name of user (as written in id card)
address string true current address of user (as written in id card)
id_card_type int true type of ID Card (0 - National ID, 1 - Driving License, 2 - Passport, 99 - Others)
id_card_number string true identification number (as written in id card)
id_card_country_code string true code name of the country where the id card is authorized (ISO 3166-1 alpha-2)

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
success bool Acknoledgement that the data has been submitted
message string post success message

Update Rejected KYC Data

Request

curl "https://api.bitwyre.com/private/account/kyc-data" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X PUT \
  -d "{\
    \"nonce\": 17081945,\
    \"checksum\": \"somechecksum\",\
    \"rejection_reason\": 6,\
    \"payload\": {\
      \"name\": \"Test User\",\
      \"address\": \"Jalan Pegangsaan Timur Nomor 56\",\
      \"id_card_type\": 0,\
      \"id_card_number\": \"AB12345\",\
      \"id_card_country_code\": \"id\",\
    },\
  }"

Response

{
  "error": [],
  "result": {
    "success": true,
    "message": "Successfully update kyc data for user be327dcb-c21b-4d4f-944d-3cf1bf297222"
  }
}

Update rejected user KYC data.

Endpoint

https://api.bitwyre.com/private/account/kyc-data

Request Fields/Parameters

Query Parameter Value Required Description
rejection_reason int True Reason of rejection. See KYC Rejection Reason

Optional Fields/Parameters

These payload is required if rejected_reason contains InvalidData or InvalidAll

Payload Fields Value Required Description
name string true full name of user (as written in id card)
address string true current address of user (as written in id card)
id_card_type int true type of ID Card (0 - National ID, 1 - Driving License, 2 - Passport, 99 - Others)
id_card_number string true identification number (as written in id card)
id_card_country_code string true code name of the country where the id card is authorized (ISO 3166-1 alpha-2)

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
success bool Acknoledgement that the data has been updated
message string update success message

Uploading KYC Files

Request

curl "https://api.bitwyre.com/private/uploadkycfiles" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: multipart/form-data" \
  -X POST \
  -F "payload={\"type\":1}" \
  -F "nonce=17081945"\
  -F "checksum=somechecksum"\
  -F "file=file.jpg"

Response

{
  "error": [],
  "result": {
    "success": true,
    "message": "Image uploaded"
  }
}

Endpoint for user to upload Identities.

Endpoint

https://api.bitwyre.com/private/uploadkycfiles

Request Fields/Parameters

JSON Field Value Required Description
type enum-number true 0- NationalIdentity; 1 - DrivingLicense; 2 - Passport ; 3 - Selfie ; 99 - Others
file .png, .jpg, .pdf true the image file

Uploading Fiat Deposit Proof

Request

curl "https://api.bitwyre.com/private/account/deposit/fiat/uploadproof" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: multipart/form-data" \
  -X POST \
  -F "payload={"transction_id":"b9443247-eb59-47ad-a9f4-f479d6b92111"}" \
  -F "checksum=somechecksum"\
  -F "file=file.jpg"

Response

{
  "error": [],
  "result": {
    "message": "Image uploaded"
  }
}

Endpoint for user to upload fiat transfer proof to be checked.

Endpoint

https://api.bitwyre.com/private/account/deposit/fiat/uploadproof

Request Fields/Parameters

JSON Field Value Required Description
transaction_id string true Transaction ID.
file .png or .jpg true the image file

Uploading KYC Files Mobile

Request

curl "https://api.bitwyre.com/private/uploadkycfiles-mobile" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: multipart/form-data" \
  -X POST \
  -F "payload={\"type\":1}" \
  -F "nonce=17081945"\
  -F "checksum=somechecksum"\
  -F "file=file.jpg"

Response

{
  "error": [],
  "result": {
    "success": true,
    "message": "Successfully Upload Image"
  }
}

Endpoint for user to upload Identities.

Endpoint

https://api.bitwyre.com/private/uploadkycfiles-mobile

Request Fields/Parameters

JSON Field Value Required Description
type enum-number true 0- NationalIdentity; 1 - DrivingLicense; 2 - Passport ; 3 - Selfie ; 99 - Others
file .png, .jpg, .pdf true the image file

Uploading Fiat Deposit Proof Mobile

Request

curl "https://api.bitwyre.com/private/account/deposit/fiat/uploadproof-mobile" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: multipart/form-data" \
  -X POST \
  -F "payload={"transction_id":"b9443247-eb59-47ad-a9f4-f479d6b92111"}" \
  -F "checksum=somechecksum"\
  -F "file=file.jpg"

Response

{
  "error": [],
  "result": {
    "message": "Successfully Upload Image"
  }
}

Endpoint for user to upload fiat transfer proof to be checked.

Endpoint

https://api.bitwyre.com/private/account/withdrawal/fiat/uploadproof-mobile

Request Fields/Parameters

JSON Field Value Required Description
transaction_id string true Transaction ID.
file .png or .jpg true the image file

Getting Support Tickets

Request

curl "https://api.bitwyre.com/private/support/ticket?page=1&per_page=3" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": [
    {
      "id": 3,
      "priority": "Medium",
      "closed_at": null,
      "resolved_at": null,
      "status": "Open",
      "subject": "Test Ticket 3",
      "type": "Incident"
    },
    {
      "id": 2,
      "priority": "Low",
      "closed_at": "2021-01-12T09:18:23Z",
      "resolved_at": "2021-01-12T09:18:23Z",
      "status": "Closed",
      "subject": "Test Ticket 2",
      "type": "Problem"
    },
    {
      "id": 1,
      "priority": "Urgent",
      "closed_at": "2021-01-07T13:22:08Z",
      "resolved_at": "2021-01-07T13:22:08Z",
      "status": "Closed",
      "subject": "Test Ticket 1",
      "type": "Refund"
    }
  ]
}

Retrieve user's support tickets data.

Endpoint

https://api.bitwyre.com/private/support/ticket

Request Fields/Parameters

Parameter Value Required Description
page int false Page number
per_page int false Number result to show. Default 50 result per page

Response Types

Returns a JSON array of support ticket details with following fields

JSON Field Data Type Remark
id int Freshdesk ticket ID
priority string Ticket priority
closed_at string Datetime of ticket closure
resolved_at string Datetime of ticket settlement
status string Current status of ticket
subject string Subject of ticket
type string Ticket type

Create a Support Ticket

Request

curl "https://api.bitwyre.com/private/support/ticket" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X POST
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\
          \"issue_type\": 1,\
          \"priority\": 1,\
          \"subject\": \"Test Subject\",\
          \"description\": \"Test Description\",\
        }\
      }"
  -F "file=file.jpg"

Response

{
  "error": [],
  "result": {
    "message": "Successfully sent support ticket.",
    "success": true
  }
}

Retrieve user's support tickets data.

Endpoint

https://api.bitwyre.com/private/support/ticket

Request Fields/Parameters

JSON Field Value Required Description
issue_type int true Ticket type. See Issue Type Freshdesk
priority int true Ticket priority. See Priority Freshdesk
subject string true Subject of ticket.
description string true Description of ticket.
file binary false the image attachment file (in .png or .jpg or .jpeg or .pdf)

Response Types

Returns a JSON array of support ticket details with following fields

JSON Field Data Type Remark
id int Freshdesk ticket ID
priority string Ticket priority
closed_at string Datetime of ticket closure
resolved_at string Datetime of ticket settlement
status string Current status of ticket
subject string Subject of Ticket
type string Ticket type

Chat and Escrow API Endpoints

Get Chat Message

Request

curl "https://api.bitwyre.com/private/chat?nonce=17081945&checksum=<payload_checksum>&payload={\"counterparty\": <counterparty_username>}" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "Counterparty": [
      {
        "from": "Active User",
        "message": "Say Hi",
        "timestamp": 1617946673962115000,
        "to": "Counterparty"
      },
      {
        "from": "Counterparty",
        "message": "Say Hi Back",
        "timestamp": 1617946673962115002,
        "to": "Active User"
      },
      {
        "from": "Active User",
        "message": "Ask Question",
        "timestamp": 1617946673962115004,
        "to": "Counterparty"
      },
      {
        "from": "Counterparty",
        "message": "Answer Question",
        "timestamp": 1617946673962115002,
        "to": "Active User"
      }
    ],
    "Counterparty2": [
      {
        "from": "Active User",
        "message": "Say Hi 2",
        "timestamp": 1617946673962115000,
        "to": "Counterparty2"
      }
    ]
  }
}

Retrieve user's chat message encrypted in Elliptic Curve Integrated Encryption Scheme (ECIES).

Endpoint

https://api.bitwyre.com/private/chat

Request Fields/Parameters

For showing chats on another username. Otherwise on if payload is not specified it automatically returns all valid chat

Payload Fields Value Required Description
counterparty string false the other user username chat to retrieve

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
chat counter party string the person who you are chatting with
list of timestamp, encrypted messages string timestamp and encrypted messages
... ... ...

Send Chat Message

Request

curl "https://api.bitwyre.com/private/chat?nonce=17081945&checksum=<payload_checksum>&payload=" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": \"I really like that painting\",\
      }"

Response

{
  "error": [],
  "result": {
    "timestamp": 1590654854095640000,
    "message_id": "3e00e9f4-fe7a-45c9-9ed7-456d9e6518b3"
  }
}

In the event that sending the chat is not successful

{
  "error": ["Internal server error"],
  "result": {}
}

Send a chat message.

Endpoint

https://api.bitwyre.com/private/chat

Request Fields/Parameters

Please refer to Authentication.

JSON Field Value Required Description
"Payload" string True Chat message

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
timestamp Integer Nanosecond timestamp
message_id UUID-String The message ID

Get Chat Message with Limit

Request

curl "https://api.bitwyre.com/private/chat/list?nonce=17081945&checksum=<payload_checksum>&payload={\"counterparty\": <counterparty_username>, limit: 5}" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "Counterparty": [
      {
        "from": "Active User",
        "message": "Say Hi",
        "timestamp": 1617946673962115000,
        "to": "Counterparty"
      },
      {
        "from": "Counterparty",
        "message": "Say Hi Back",
        "timestamp": 1617946673962115002,
        "to": "Active User"
      },
      {
        "from": "Active User",
        "message": "Ask Question",
        "timestamp": 1617946673962115004,
        "to": "Counterparty"
      },
      {
        "from": "Counterparty",
        "message": "Answer Question",
        "timestamp": 1617946673962115002,
        "to": "Active User"
      }
    ],
    "Counterparty2": [
      {
        "from": "Active User",
        "message": "Say Hi 2",
        "timestamp": 1617946673962115000,
        "to": "Counterparty2"
      }
    ]
  }
}

Retrieve user's chat message encrypted in Elliptic Curve Integrated Encryption Scheme (ECIES) with limit data.

Endpoint

https://api.bitwyre.com/private/chat/list

Request Fields/Parameters

For showing chats on another username. Otherwise on if payload is not specified it automatically returns all valid chat

Payload Fields Value Required Description
counterparty string false the other user username chat to retrieve
limit int false number of retrieved chat data

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
chat counter party string the person who you are chatting with
list of timestamp, encrypted messages string timestamp and encrypted messages
... ... ...

Search Chat Message

Request

curl "https://api.bitwyre.com/private/chat/search?nonce=17081945&checksum=<payload_checksum>&payload={\"keyword\":\"Hello\"}" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X GET

Response

{
  "error": [],
  "result": {
    "Counterparty": [
      {
        "from": "Active User",
        "message": "Hello whats good?",
        "timestamp": 1617946673962115000,
        "to": "Counterparty"
      },
      {
        "from": "Counterparty",
        "message": "Hello, BTC is to the moon",
        "timestamp": 1617946673962115002,
        "to": "Active User"
      }
    ]
  }
}

In the event that searching the chat is not successful

{
  "error": ["Internal server error"],
  "result": {}
}

Search inside historial chats.

Endpoint

https://api.bitwyre.com/private/chat/search

Request Fields/Parameters

Payload Fields Value Required Description
keyword string True Chat message to be search
counterparty string False The other user username chat to retrieve

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
chat counter party string the person who you are chatting with
list of timestamp, encrypted messages string timestamp and encrypted messages
... ... ...

Send Escrow Request

Request

curl "https://api.bitwyre.com/private/escrow" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {
            \"base_asset\": \"btc\",\
            \"base_asset_amount\":\"1000\",\
            \"quote_asset\": \"eth\",\
            \"quote_asset_amount\":\"3000\",\
            \"counterparty\": \"counterparty\"}\
      }"

Response

{
  "error": [],
  "result": {
    "status": "pending",
    "escrow_id": "76f7704b-85c7-4cb8-9a71-e48293616705",
    "implied_price": "0.00000001 BTC/IDR",
    "instrument": "btc_idr_spot",
    "action": "Exchange 1 BTC for 100000000 IDR",
    "counterparty": "John",
    "fee_percentage": "0.01%",
    "fee_amount": "0.01 BTC",
    "order_time": 1495324800000000001,
    "order_expiry_time": 1495424800000000001
  }
}

Send an OTC escrow request

Endpoint

https://api.bitwyre.com/private/escrow

Request Fields/Parameters

Please refer to Authentication.

JSON Field Value Required Description
"Payload" string True base_asset, base_asset_amount, quote_asset, quote_asset_amount, counterparty

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
status String Acknoledgement that the post has been sent
escrow_id UUID-String Unique ID for the escrow request
implied_price Float-String Base Amount/Quote Amount
instrument String Instrument Base/Quote
action String A simple message about the trade
counterparty String The counterparty username
fee_percentage Float-String Amount of fee in percentage
fee Float-String Amount of fee in quote asset
order_time Float-String Nanosecond timestamp when order is specified
order_expiry_time Integer Nanosecond timestamp when order would be expired

Accepting An Escrow Request

Request

curl "https://api.bitwyre.com/private/escrow" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X PUT \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\"escrow_id\": \"9fa11e7f-afdf-4e89-a8a7-5a2d95a34026\"}
      }"

Response

{
  "error": [],
  "result": {
    "status": "processing",
    "escrow_id": "9fa11e7f-afdf-4e89-a8a7-5a2d95a34026"
  }
}

Accepting a OTC escrow request

Endpoint

https://api.bitwyre.com/private/escrow

Request Fields/Parameters

Please refer to Authentication.

JSON Field Value Required Description
"Payload" string True escrow_id

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
status string Current status of the trade
escrow_id UUID-String Unique ID for the escrow request

Declining An Escrow Request

Request

curl "https://api.bitwyre.com/private/escrow" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X DELETE \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\"escrow_id\": \"9fa11e7f-afdf-4e89-a8a7-5a2d95a34026\"}"

Response

{
  "error": [],
  "result": {
    "status": "rejected",
    "escrow_uuid": "76f7704b-85c7-4cb8-9a71-e48293616701",
    "status_reason": "counterparty_reject"
  }
}

Declining a OTC escrow request

Endpoint

https://api.bitwyre.com/private/escrow

Request Fields/Parameters

Please refer to Authentication.

JSON Field Value Required Description
"Payload" string True escrow_id

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
status string Current status of the trade
escrow_id UUID-String Unique ID for the escrow request
status_reason Stringtring Reason of the current status

Escrow History

Request

curl "https://api.bitwyre.com/private/escrow/history/<escrow_uuid>" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X GET

Response

{
  "error": [],
  "result": [
    {
      "base_amount": 1.0,
      "escrow_uuid": "cb60899c-7fd2-47b7-9de3-55d2f65e8855",
      "counterparty": "John",
      "counterparty_id": "0950831861a05539f5ec74f8d5faafddad70fdf385804955532beb91052e458a",
      "fee_amount": "0.01 BTC",
      "fee_percentage": "0.01%",
      "implied_price": "0.00000001 BTC/IDR",
      "instrument": "btc_idr_spot",
      "message": "Lee asks John to exchange 1.0 BTC for 100000000.0 IDR",
      "order_expiry_time": 1618825892598826000,
      "order_time": 1618822292598826000,
      "quote_amount": 100000000.0,
      "requester": "Lee",
      "requester_id": "127e50eb9a6646e2833fee8d69477c7371e2cbc5fbb0a37b7f83b58f02f512d9",
      "status": "processing",
      "status_reason": ""
    },
    {
      "base_amount": 1.0,
      "escrow_uuid": "cb60899c-7fd2-47b7-9de3-55d2f65e8857",
      "counterparty": "John",
      "counterparty_id": "0950831861a05539f5ec74f8d5faafddad70fdf385804955532beb91052e458a",
      "fee_amount": "0.01 BTC",
      "fee_percentage": "0.01%",
      "implied_price": "0.00000001 BTC/IDR",
      "instrument": "btc_idr_spot",
      "message": "Lee asks John to exchange 1.0 BTC for 100000000.0 IDR",
      "order_expiry_time": 1618825892598826000,
      "order_time": 1618822292598826000,
      "quote_amount": 100000000.0,
      "requester": "Lee",
      "requester_id": "127e50eb9a6646e2833fee8d69477c7371e2cbc5fbb0a37b7f83b58f02f512d9",
      "status": "rejected",
      "status_reason": "counterparty_reject"
    }
  ]
}

History of a user's OTC escrow trades

Endpoint

https://api.bitwyre.com/private/escrow

Request Fields/Parameters

Please refer to Authentication.

Payload Fields Value Required Description
escrow_uuid string false the unique escrow identifier, when speficied "all" will return every escrow transaction

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
status string The current status of the trade
status_reason string Reason for the status
requester string The username who initiated the trade
requester_id Hash-string The hashed uuid who initiated the trade
counterparty string The counterparty username
counterparty_id Hash-string The counterparty hashed uuid
escrow_id UUID-String Unique ID for the escrow request
implied_price Float-String Base Amount/Quote Amount
instrument String Instrument Base/Quote
base_amount String The base amount to be traded
quote_amount String The quote amount to be traded
message String A simple message explaining the trade
fee_percentage Float-String Amount of fee in percentage
fee Float-String Amount of fee in quote asset
timestamp Integer Nanosecond timestamp when order was specified
order_expiry_time Integer Nanosecond timestamp when order would be expired

Escrow History Pending

Request

curl "https://api.bitwyre.com/private/escrow/pending" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X GET

Response

{
  "error": [],
  "result": [
    {
      "base_amount": 1.0,
      "escrow_uuid": "cb60899c-7fd2-47b7-9de3-55d2f65e8855",
      "counterparty": "John",
      "counterparty_id": "0950831861a05539f5ec74f8d5faafddad70fdf385804955532beb91052e458a",
      "fee_amount": "0.01 BTC",
      "fee_percentage": "0.01%",
      "implied_price": "0.00000001 BTC/IDR",
      "instrument": "btc_idr_spot",
      "message": "Lee asks John to exchange 1.0 BTC for 100000000.0 IDR",
      "order_expiry_time": 1618825892598826000,
      "order_time": 1618822292598826000,
      "quote_amount": 100000000.0,
      "requester": "Lee",
      "requester_id": "127e50eb9a6646e2833fee8d69477c7371e2cbc5fbb0a37b7f83b58f02f512d9",
      "status": "processing",
      "status_reason": ""
    },
    {
      "base_amount": 1.0,
      "escrow_uuid": "cb60899c-7fd2-47b7-9de3-55d2f65e8857",
      "counterparty": "John",
      "counterparty_id": "0950831861a05539f5ec74f8d5faafddad70fdf385804955532beb91052e458a",
      "fee_amount": "0.01 BTC",
      "fee_percentage": "0.01%",
      "implied_price": "0.00000001 BTC/IDR",
      "instrument": "btc_idr_spot",
      "message": "Lee asks John to exchange 1.0 BTC for 100000000.0 IDR",
      "order_expiry_time": 1618825892598826000,
      "order_time": 1618822292598826000,
      "quote_amount": 100000000.0,
      "requester": "Lee",
      "requester_id": "127e50eb9a6646e2833fee8d69477c7371e2cbc5fbb0a37b7f83b58f02f512d9",
      "status": "processing",
      "status_reason": ""
    }
  ]
}

Return all still pending escrow request for the current user only

Endpoint

https://api.bitwyre.com/private/escrow

Request Fields/Parameters

Please refer to Authentication.

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
status string The current status of the trade
status_reason string Reason for the status
requester string The username who initiated the trade
requester_id Hash-string The hashed uuid who initiated the trade
escrow_id UUID-String Unique ID for the escrow request
implied_price Float-String Base Amount/Quote Amount
instrument String Instrument Base/Quote
base_amount String The base amount to be traded
quote_amount String The quote amount to be traded
message String A simple message explaining the trade
fee_percentage Float-String Amount of fee in percentage
fee Float-String Amount of fee in quote asset
timestamp Integer Nanosecond timestamp when order was specified
order_expiry_time Integer Nanosecond timestamp when order would be expired

Send Forum Posts

Request

curl "https://api.bitwyre.com/private/forum?nonce=17081945&checksum=<payload_checksum>&payload=" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X POST \
  -d "{\
        \"nonce\": 17081945,\
        \"checksum\": \"somechecksum\",\
        \"payload\": {\"post\": \"this be posts\",\"tagged\":\"john\"}\
      }"

Response

{
  "error": [],
  "result": {
    "success": true,
    "timestamp": 1590654854095640000
  }
}

Send a forum post

Endpoint

https://api.bitwyre.com/private/forum

Request Fields/Parameters

Please refer to Authentication.

JSON Field Value Required Description
"Payload" string True Post message

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
success Bool Acknoledgement that the post has been sent
timestamp Integer Nanosecond timestamp

Get Forum Posts

Request

curl "https://api.bitwyre.com/private/forum?nonce=17081945&checksum=<payload_checksum>&payload={\"tagged\":\"John\",\"poster\":\"Jane\",\"from_time\":\"123123\",\"to_time\":\"123123123\"}" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -H "Content-Type: application/json" \
  -X GET \

Response

{
  "error": [],
  "result": [
    {
      "post": "ola",
      "poster": "Jane",
      "tagged": "John",
      "timestamp": 1618212090462703000
    }
  ]
}

Send a forum post

Endpoint

https://api.bitwyre.com/private/forum

Request Fields/Parameters

Please refer to Authentication.

JSON Field Value Required Description
"Payload" string True Tagged user, time range

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
success Bool Acknoledgement that the post has been sent
timestamp Integer Nanosecond timestamp
Posts String Received posts

Getting Referrals Info

Request

curl "https://api.bitwyre.com/private/referrals?nonce=17081945&checksum=<payload_checksum>&payload=" \
  -H "API-Key: someapikey" \
  -H "API-Sign: somesignature" \
  -X GET

Response

{
  "error": [],
  "result": {
    "total_invited": 1,
    "total_earned": { "btc": "0.001", "idr": "1000" }
  }
}

Retrieve referrals info.

Endpoint

https://api.bitwyre.com/private/referrals

Request Fields/Parameters

Because this is a GET endpoint, nonce & checksum are query parameters, also payload should be always an empty string. The SHA256 steps for this endpoint's payload:

  1. jsonify an empty string.
  2. then SHA256 from above result.

Please refer to Authentication.

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
total_invited int People you invite
total_earned int Total earned group by asset

OTC

Get Crypto Networks

curl "https://api.bitwyre.com/app/otc/wallet/network" \
  -H "Authorization: Bearer <access_token>" \
  -X GET

Response

{
  "error": [],
  "result": [
        {
            "deposit_wallet_id": 13689,
            "withdrawal_wallet_id": 13688,
            "coin": "btc"
        },
        {
            "deposit_wallet_id": 13687,
            "withdrawal_wallet_id": 13686,
            "coin": "eth"
        },
        {
            "deposit_wallet_id": 13694,
            "withdrawal_wallet_id": 13693,
            "coin": "sol"
        }
    ]
}

Retrieve list of available crypto networks

Endpoint

https://api.bitwyre.com/app/otc/wallet/network

Request Fields/Parameters

None

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
deposit_wallet_id int ID for Wallet Deposit
withdrawal_wallet_id int ID for Wallet Withdrawal
coin string Crypto Asset

Get Crypto Wallet Balances

curl "https://api.bitwyre.com/app/otc/wallet/balance" \
  -H "Authorization: Bearer <access_token>" \
  -X GET

Response

{
  "error": [],
  "result":  {
        "data": [
            {
                "asset": "eth",
                "icon_url": "https://robin.bitwyre.id/app/Raster/ETH_125px.png",
                "asset_name": "Ethereum",
                "total_balance": "2.34360451",
                "type": "crypto",
                "available_balance": "2.33076451",
                "locked_balance": "0.01284"
            },
            {
                "asset": "btc",
                "icon_url": "https://robin.bitwyre.id/app/Raster/BTC_125px.png",
                "asset_name": "Bitcoin",
                "total_balance": "0.01291978",
                "type": "crypto",
                "available_balance": "0.01291978",
                "locked_balance": "0"
            },
        ],
        "metadata": {
            "page": 1,
            "has_next": true
        }
    }
}

Retrieve list of user's available crypto wallet

Endpoint

https://api.bitwyre.com/app/otc/wallet/balance

Request Fields/Parameters

Query Parameter Data Type Required Remark
type string true Asset Type. Possible values are crypto
page string true Number of page of data that will be returned

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
asset string Asset
icon_url int Asset icon URL
asset_name string Asset name
total_balance string User total balance
type string Asset type
available_balance string User available balance
locked_balance string User locked balance

Get Crypto Asset Lists

curl "https://api.bitwyre.com/app/otc/assets" \
  -H "Authorization: Bearer <access_token>" \
  -X GET

Response

{
    "errors": [],
    "result": [
        {
            "asset": "audf",
            "name": "Australian Dollar Forte",
            "icon_url": "https://robin.bitwyre.id/app/Raster/AUDF_125px.png"
        },
        {
            "asset": "bidr",
            "name": "Binance IDR Token",
            "icon_url": "https://robin.bitwyre.id/app/Raster/BIDR_64px.png"
        },
    ]
}

Retrieve list of available assets

Endpoint

https://api.bitwyre.com/app/otc/assets

Request Fields/Parameters

None

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
asset string Asset
name string Asset name
icon_url int Asset icon URL

Generate Deposit Address

curl "https://api.bitwyre.com/app/otc/wallet/deposit?asset=eth&wallet_id={wallet_id}" \
  -H "Authorization: Bearer <access_token>" \
  -X GET

Response

{
    "errors": [],
    "result": {
        "address": "0x1E210A64a7Bf01A4d6a021013A048F51dc0eDDE4",
        "asset": "eth"
    }
}

Generate Deposit Address For Wallet Balance OTC

Endpoint

https://api.bitwyre.com/app/otc/wallet/deposit?asset=eth&wallet_id={wallet_id}

Request Fields/Parameters

Query Parameter Data Type Required Remark
asset string true Asset Name. Possible values are in asset list
wallet_id int true Deposit Wallet ID from list networks

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
address string Address to deposit
asset string Asset name

Get Deposit Histories

curl "https://api.bitwyre.com/app/otc/wallet/deposit/histories?asset=btc" \
  -H "Authorization: Bearer <access_token>" \
  -X GET

Response

{
    "errors": [],
    "result": {
        "data": [
            {
                "asset": "btc",
                "date": "2023-12-20T05:45:11Z",
                "gross_amount": "0.0001",
                "nett_amount": "0.0001",
                "fees": "0.00000416",
                "txn": "https://blockstream.info/testnet/tx/d71767937f6a9486a6d70c524a081d70edc185c33585062f965ae417473b766b",
                "status": "success"
            },
            {
                "asset": "btc",
                "date": "2023-12-20T05:44:39Z",
                "gross_amount": "0.001",
                "nett_amount": "0.001",
                "fees": "0.00000143",
                "txn": "https://blockstream.info/testnet/tx/b01850726154ef2ba586981eeabd69ac3fb778ae642cd8214c1af779580aa1d9",
                "status": "success"
            },
        ]
    }
}

Get User Deposit Histories

Endpoint

https://api.bitwyre.com/app/otc/wallet/deposit/histories?asset={asset}

Request Fields/Parameters

Query Parameter Data Type Required Remark
asset string true Asset Name. Possible values are in asset list

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
asset string Asset name
date string Deposit datetime
gross_amount string Gross amount of deposit value
nett_amount string Nett amount of deposit value
fees string Deposit fee amount
txn string Detail transaction URL
status string Deposit status

Get Withdrawal Histories

curl "https://api.bitwyre.com/app/otc/wallet/withdraw/histories?asset=eth" \
  -H "Authorization: Bearer <access_token>" \
  -X GET

Response

{
    "errors": [],
    "result": {
        "data": [
            {
                "asset": "eth",
                "date": "2023-12-20T09:39:12Z",
                "gross_amount": "0.0012",
                "nett_amount": "0.0012",
                "fees": "0.000126",
                "requested_amount": "0.0012",
                "txn": "https://goerli.etherscan.io/tx/0x2016da3735503b8e2acbe3f3a76add7a7016988e5a333c6c9000135eac7c3a60",
                "status": "confirmed"
            },
            {
                "asset": "eth",
                "date": "2023-12-19T21:54:24Z",
                "gross_amount": "0.00329",
                "nett_amount": "0.00329",
                "fees": "0.000126",
                "requested_amount": "0.00329",
                "txn": "https://goerli.etherscan.io/tx/0x9951abfee7f69ae9bad086eabb5db04af4f9ad5c7fcb79548bd79902ec8fe73e",
                "status": "confirmed"
            },
        ]
    }
}

Get User Withdrawal Histories

Endpoint

https://api.bitwyre.com/app/otc/wallet/withdraw/histories?asset={asset}

Request Fields/Parameters

Query Parameter Data Type Required Remark
asset string true Asset Name. Possible values are in asset list

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
asset string Asset name
date string Withdrawal datetime
gross_amount string Gross amount of withdrawal
nett_amount string Nett amount of withdrawal
fees string Withdrawal fee amount
requested_amount string Total amount requested
txn string Detail Withdrawal transaction URL
status string Withdrawal status

List Orders

curl "https://api.bitwyre.com/app/otc/orders?page=1" \
  -H "Authorization: Bearer <access_token>" \
  -X GET

Response

{
    "errors": [],
    "result": {
        "data": [
            {
                "order_uuid": "163790b7-ee29-4688-80e7-7c28b761b312",
                "instrument": "usdt_btc",
                "side": "buy",
                "rate_offers": "42433.39",
                "qty": "10000.00",
                "fee": "848.6677810308",
                "total_received": "41584.7222189692",
                "fee_percentage": 0.02,
                "order_status": "need_confirmation",
                "settlement_date": "2023-12-16T15:46:19Z",
                "canceled_reason": null,
                "created_at": "2023-12-14T15:46:19Z",
                "updated_at": "2023-12-14T15:46:19Z",
                "base_asset": {
                    "asset": "usdt",
                    "name": "USD Tether Stablecoin",
                    "icon_url": "https://robin.bitwyre.id/app/Raster/USDT_125px.png"
                },
                "quote_asset": {
                    "asset": "btc",
                    "name": "Bitcoin",
                    "icon_url": "https://robin.bitwyre.id/app/Raster/BTC_125px.png"
                }
            },
        ]
    }
}

List of quote orders

Endpoint

https://api.bitwyre.com/app/otc/orders?page=1

Request Fields/Parameters

Query Parameter Data Type Required Remark
page int false page number for pagination

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
order_uuid string Order identifiers
instrument string Order pairs information, example: eth_btc
side string Order Side (deprecated soon)
rate_offers string Rate for target assets
qty string Order qty amount
fee string Order fee amount
total_received string Total amount that client will be received
order_status string Current order status
settlement_date string User settlement date that client requested
canceled_reason string Reason if order got cancelled
created_at string Order creation date
updated_at string Order updated date
base_asset object From asset information
quote_asset object Target asset information

Create Order

curl "https://api.bitwyre.com/app/otc/orders" \
  -H "Authorization: Bearer <access_token>" \
  -X POST \
  --header 'Content-Type: application/json' \
  --data '{
      "instrument": "eth_btc",
      "qty": "100",
      "fee_percentage": 0.2,
      "settlement_date": "2023-12-30"
  }'

Response

{
    "errors": [],
    "result": {
        "order_uuid": "4bf1fc83-5092-4c59-8247-3cc8cf2c3b3c"
    }
}

Order Creation (Order Quotes)

Endpoint

https://api.bitwyre.com/app/otc/orders

Request Fields/Parameters

Body Parameter Data Type Required Remark
instrument string true Pairs information in FROM_TARGET format
qty string true Order quantity of FROM asset
fee_percentage float true Total fee of the order
settlement_date stringdate true Client settlement date request

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
order_uuid string Order created identifiers

Update Order Status

curl "https://api.bitwyre.com/app/otc/orders/{order_uuid}" \
  -H "Authorization: Bearer <access_token>" \
  -X PUT \
  --header 'Content-Type: application/json' \
  --data '{
    "status": "accepted",
    "reason": ""
  }'

Response

{
    "errors": [],
    "result": {
        "success": true
    }
}

Order Update (Quotes Confirmation)

Endpoint

https://api.bitwyre.com/app/otc/orders/{order_uuid}

Request Fields/Parameters

Query Parameter Data Type Required Remark
order_uuid string true Order identifiers to confirm
Body Parameter Data Type Required Remark
status string true Status of orders confirmation, available values: accepted, rejected, cancelled
reason string false Cancellation reason (if applicable)

Response Types (JSON Object as Key-Value Pair)

JSON Field Data Type Remark
success bool Result of operation

Update Order Payment Data

Bank Payment shell curl "https://api.bitwyre.com/app/otc/orders/{order_uuid}/payment" \ -H "Authorization: Bearer <access_token>" \ -X PUT \ --header 'Content-Type: application/json' \ --data '{ "type": "balance", "bank": { { "bank": "BCA", "bank_account_name": "bitwyre", "bank_account_number": "08123481313", "bank_swiftcode": "", "bank_country": "idr", } } }'

Crypto shell curl "https://api.bitwyre.com/app/otc/orders/{order_uuid}/payment" \ -H "Authorization: Bearer <access_token>" \ -X PUT \ --header 'Content-Type: application/json' \ --data '{ "type": "crypto", "crypto": { "crypto_asset": "btc", "crypto_address": "1badadaajfafafkaafa" } }'

Response

{
    "errors": [],
    "result": {
        "success": true
    }
}

Endpoint

https://api.bitwyre.com/app/otc/orders/{order_uuid}/payment

Request Fields/Parameters

Query Parameter Data Type Required Remark
order_uuid string true Order identifiers to confirm
Body Parameter Data Type Required Remark
type string true type of payment. available types : balance and crypto
crypto object false {"crypto_asset": "btc", "crypto_address": "1badadadaddad"}
balance object false {"bank": "BCA", "bank_account": "1badadadaddad", "banck_account_number": "13145225252", "bank_swiftcode": "DDJIA", "bank_country": "idr"}

For update payment all address is internal address from bitwyre (generated by user via our platform)

Update Order Settlement Data

Bank Payment shell curl "https://api.bitwyre.com/app/otc/orders/{order_uuid}/settlement" \ -H "Authorization: Bearer <access_token>" \ -X PUT \ --header 'Content-Type: application/json' \ --data '{ "type": "balance", "bank": { { "bank": "BCA", "bank_account_name": "bitwyre", "bank_account_number": "08123481313", "bank_swiftcode": "", "bank_country": "idr", } } }'

Crypto shell curl "https://api.bitwyre.com/app/otc/orders/{order_uuid}/settlement" \ -H "Authorization: Bearer <access_token>" \ -X PUT \ --header 'Content-Type: application/json' \ --data '{ "type": "crypto", "crypto": { "crypto_asset": "btc", "crypto_address": "1badadaajfafafkaafa" } }'

Response

{
    "errors": [],
    "result": {
        "success": true
    }
}

Endpoint

https://api.bitwyre.com/app/otc/orders/{order_uuid}/settlement

Request Fields/Parameters

Query Parameter Data Type Required Remark
order_uuid string true Order identifiers to confirm
Body Parameter Data Type Required Remark
type string true type of payment. available types : balance and crypto
crypto object false {"crypto_asset": "btc", "crypto_address": "1badadadaddad"}
balance object false {"bank": "BCA", "bank_account": "1badadadaddad", "banck_account_number": "13145225252", "bank_swiftcode": "DDJIA", "bank_country": "idr"}

For update payment all address is external address (user personal wallet)

Withdrawal Request

Request shell curl "https://api.bitwyre.com/app/otc/wallet/withdrawl" \ -H "Authorization: Bearer <access_token>" \ -X POST \ --header 'Content-Type: application/json' \ --data '{ "target_address": "bc1q8cgmzxm5yp3e452jnzw2k6ad530uujl6ekvpcv", "asset": "btc", "amount": "0.0000341" }'

Response

{
    "errors": [],
    "result": {
        "success": true
    }
}

Endpoint

https://api.bitwyre.com/app/otc/wallet/withdraw

Request Fields/Parameters

Body Parameter Data Type Required Remark
target_address string true user personal destination address
asset string true asset
amount string true amount to deduct

List Transaction OTC

Request shell curl "https://api.bitwyre.com/app/otc/transaction?page=1" \ -H "Authorization: Bearer <access_token>" \ -X POST \ --header 'Content-Type: application/json'

Response shell { "errors": [], "result": { "data": [ { "tx_uuid": "b67d4f7c-7f41-48f4-95ae-af972b66d100", "instrument": "eth_btc", "order_uuid": "4bf1fc83-5092-4c59-8247-3cc8cf2c3b3c", "order_status": 2, "order_side": 1, "order_qty": "100.00", "order_total_received": "5.1589505409", "tx_status": 1, "tx_type": "crypto/crypto", "payment_type": null, "payment_status": null, "payment_complete_date": null, "payment_bank": null, "payment_bank_account_name": null, "payment_bank_account_number": null, "payment_bank_swiftcode": null, "payment_bank_country": null, "payment_crypto_asset": null, "payment_crypto_address": null, "settlement_type": null, "settlement_status": null, "settlement_complete_date": null, "settlement_bank": null, "settlement_bank_account_name": null, "settlement_bank_account_number": null, "settlement_bank_swiftcode": null, "settlement_bank_country": null, "settlement_crypto_asset": null, "settlement_crypto_address": null, "created_at": "2023-12-20T12:10:28Z", "updated_at": "2023-12-20T12:10:28Z", "base_asset": { "asset": "eth", "name": "Ethereum", "icon_url": "https://robin.bitwyre.id/app/Raster/ETH_125px.png" }, "quote_asset": { "asset": "btc", "name": "Bitcoin", "icon_url": "https://robin.bitwyre.id/app/Raster/BTC_125px.png" } }, { "tx_uuid": "b45a660a-f182-40c3-a2d8-8bc357e3b507", "instrument": "eth_btc", "order_uuid": "5f11c4f2-302f-48ef-88a4-27b8112fc65c", "order_status": 2, "order_side": 1, "order_qty": "0.0090", "order_total_received": "0.0009", "tx_status": 3, "tx_type": "crypto/crypto", "payment_type": 3, "payment_status": "completed", "payment_complete_date": "2023-12-14T15:03:40Z", "payment_bank": "", "payment_bank_account_name": "", "payment_bank_account_number": "", "payment_bank_swiftcode": null, "payment_bank_country": null, "payment_crypto_asset": "", "payment_crypto_address": "", "settlement_type": 3, "settlement_status": null, "settlement_complete_date": "2023-12-14T15:13:12Z", "settlement_bank": "", "settlement_bank_account_name": "", "settlement_bank_account_number": "", "settlement_bank_swiftcode": null, "settlement_bank_country": null, "settlement_crypto_asset": "", "settlement_crypto_address": "", "created_at": "2023-12-14T14:51:39Z", "updated_at": "2023-12-14T15:13:12Z", "base_asset": { "asset": "eth", "name": "Ethereum", "icon_url": "https://robin.bitwyre.id/app/Raster/ETH_125px.png" }, "quote_asset": { "asset": "btc", "name": "Bitcoin", "icon_url": "https://robin.bitwyre.id/app/Raster/BTC_125px.png" } } ], "metadata": { "page": 1, "has_next": false } } }

Endpoint

https://api.bitwyre.com/app/otc/transaction?page=1

Request Fields/Parameters

Query Parameter Data Type Required Remark
page string true page

Websocket Public API Endpoints

WS Server Time

Connecting

websocat -E "wss://api.bitwyre.com/ws/public/time"

Streaming Responses (1 Hz)

{"unixtime":1571744594571020435}
{"unixtime":1571744595571648685}
{"unixtime":1571744596571345719}
{"unixtime":1571744597571387480}
...

Streams server's time every second.

This helps in approximating the time difference between the server and client.

WS Endpoint

wss://api.bitwyre.com/ws/public/time

WS Request Fields/Parameters

WS Streaming Data Types (JSON Object)

JSON Field Data Type Remark
"unixtime" big-number/i64 unix time in nanoseconds

Websocket Stream

Connecting

websocat -E "wss://api.bitwyre.com/ws/stream"

Bitwyre allows subscribing to real-time data. This access is not rate-limited once connected and is the best way to get the most up-to-date data to your programs.

To subscribe to topics, send them as a comma-separated list in your connection string. For example:

websocat -E wss://api.bitwyre.com/ws/stream

If you are already connected and wish to subscribe to a new topic, send a message with the following format:

{"op": "subscribe", "args": [<SubscriptionTopic1>, <SubscriptionTopic2>, ...]}

You may subscribe to multiple topics at a time by sending an array of subscription topics.

The following subscription topics are available without authentication:

Topic Subscription Data Description
announcement Site announcements
markets The markets supported by Bitwyre e.g crypto, equities, commodities, fixed_income
products The products supported by Bitwyre
assets The assets supported by Bitwyre
instruments:market_product_country The instrument supported by Bitwyre in the format ex. btc_usdt_spot for jurisdictions
contract The contract details for a derivative instrument/asset pair traded at Bitwyre
ticker:instrument The ticker stream supported for instruments at Bitwyre
trades:instrument The trades stream supported for instruments at Bitwyre
depthl2:instrument The L2 (full snapshot) depth stream supported for instruments at Bitwyre
depthl2_10:instrument The L2 (full snapshot) top 10 depth stream supported for instruments at Bitwyre
depthl2_25:instrument The L2 (full snapshot) top 25 depth stream supported for instruments at Bitwyre
depthl2_incr:instrument The L2 (incremental/changes) only stream supported for instruments at Bitwyre
depthl3:instrument The L3 market data stream supported for instruments at Bitwyre

If you wish to get real-time order book data, we recommend you use the depthl2_25 subscription. depth10 pushes the top 10 levels on every tick, but transmits much more data. depthl2 pushes the full L2 order book, but the payload can get very large. orderbookL2_25 provides a subset of the full L2 orderbook, but is throttled. In the future, depth10 may be throttled, so use depthl2 in any latency-sensitive application. For those curious, the id on an depthl2_25 or depthl2 entry is a composite of price and symbol, and is always unique for any given price level. It should be used to apply update and delete actions.

When applicable, subjects may be filtered to a given instrument by appending a colon and instrument name. For example, trade:btc_usdt_spot will subscribe you to messages only for the btc_usdt_spot instrument.

Example traffic data would be

> {"op": "subscribe", "args": ["depthl2:btc_usdt_spot"]}
    < {"success":true,"subscribe":"depthl2:btc_usdt_spot","request":{"op":"subscribe","args":["depthl2:btc_usdt_spot"]}}
    < {
          "table": "depthl2",
          "action": "snapshot",
          "data": {
            "instrument": "btc_usdt_spot",
            "bids": [
              {
                "price": "41787.99",
                "qty": "0.00019"
              },
              {
                "price": "41786.99",
                "qty": "0.00019"
              },
              {
                "price": "41785.99",
                "qty": "0.00019"
              },
            ],
            "asks": [
              {
                "price": "41893.88",
                "qty": "0.00025"
              },
              {
                "price": "41894.88",
                "qty": "0.00025"
              },
              {
                "price": "41895.88",
                "qty": "0.00025"
              },
            ]
          }
      }
    ...

Upon subscription, you will receive an image of the existing data, so you can get started. This comes through as a snapshot action.

You may receive other messages before the snapshot comes through. In that case, drop any messages received until you have received the snapshot.

Some notes on this response:

You may unsubscribe using the 'unsubscribe' operation. The formatting is identical to 'subscribe'. Several stream channels are described below.

WS Instruments

Connecting and Query/Request

websocat -E "wss://api.bitwyre.com/ws/stream"

Query Response

> {"op": "subscribe", "args": ["instruments:crypto_spot_ID"]}
    < {"success":true,"subscribe":"instruments:crypto_spot_ID","request":{"op":"subscribe","args":["instruments:crypto_spot_ID"]}}
    < {
          "table":"instruments:crypto_spot_ID",
          "keys":["instrument", "symbol"],
          "types": {"str", "str"}
          "action": "snapshot",
          "data": [
            {"instrument": "btc_idr_spot", "symbol" : "BTC/IDR"},
            {"instrument": "bch_idr_spot", "symbol": "BCH/IDR"},
            {"instrument": "eth_idr_spot", "symbol": "ETH/IDR"},
            ...
          ]
      }
     ...

Returns an underscore _ delimited tradable asset instruments array.

A sample response for a futures market in crypto:

Request

websocat -E "wss://api.bitwyre.com/ws/stream"

Response

> {"op": "subscribe", "args": ["instruments:crypto_futures_PA"]}
    < {"success":true,"subscribe":"instruments:crypto_futures_PA","request":{"op":"subscribe","args":["instruments:crypto_futures_PA"]}}
    < {
          "table":"instruments:crypto_futures_PA",
          "keys":["instrument", "symbol"],
          "types": {"str", "str"}
          "action": "snapshot",
          "data": [
            {"instrument": "btcusdtx_usdt_200607F1000000", "symbol" : "BTCM0"}, # BTC USD Index, futures contract, settled in USD, delivery on June 7th 2020, strike price of 10000 USD
            {"instrument": "bchusdtx_usdt_200607F30000", "symbol": "BCHM0"}, # BCH USD Index, futures contract, settled in USD, delivery on June 7th 2020, strike price of 300 USD
            {"instrument": "ethusdtx_usdt_200607F50000", "symbol": "ETHM0"}, # ETH USD Index, futures contract, settled in USD, delivery on June 7th 2020, strike price of 300 USD
            ...
          ]
      }
     ...

We are using an _ (underscore) delimited convention to refer our futures and options product: underlying_settlementcurrency_productdetails.

  1. Underlying financial instrument price. btcusdtx here is the Bitcoin to USD index on Bitwyre's exchange; a weighted average of worldwide Bitcoin spot market index price.
  2. Settlement currency, USD.
  3. Product details:
    • Expiration date: 6 digits in the YYMMDD format.
    • Products:
      • F for Futures.
      • For Options, either P for put or C for call.
      • S for Swaps.
    • Strike price: settlement currency in cents (For this USD example, 10000 here means 100 dollars).

A sample response for an options market in crypto:

Request

websocat -E "wss://api.bitwyre.com/ws/stream"

Response

> {"op": "subscribe", "args": ["instruments:crypto_futures_PA"]}
    < {"success":true,"subscribe":"instruments:crypto_futures_PA","request":{"op":"subscribe","args":["instruments:crypto_futures_PA"]}}
    < {
          "table":"instruments:crypto_futures_PA",
          "keys":["instrument", "symbol"],
          "types": {"str", "str"}
          "action": "snapshot",
          "data": [
            {"instrument": "btcusdtx_usdt_200607C1000000", "symbol" : "BTCM0"}, # BTC USD Index, call options, settled in USD, delivery on June 7th 2020, strike price of 10000 USD
            {"instrument": "bchusdtx_usdt_200607C30000", "symbol" : "BCHM0"}, # BCH USD Index, call options, settled in USD, delivery on June 7th 2020, strike price of 300 USD
            {"instrument": "ethusdtx_usdt_200607C50000", "symbol" : "ETHM0"}, # ETH USD Index, call options, settled in USD, delivery on June 7th 2020, strike price of 300 USD
            {"instrument": "btcusdtx_usdt_200607P500000", "symbol" : "BTCM0"}, # BTC USD Index, put options, settled in USD, delivery on June 7th 2020, strike price of 5000 USD
            {"instrument": "bchusdtx_usdt_200607P10000", "symbol" : "BCHM0"}, # BCH USD Index, put options, settled in USD, delivery on June 7th 2020, strike price of 100 USD
            {"instrument": "ethusdtx_usdt_200607P10000", "symbol" : "ETHM0"}, # ETH USD Index, put options, settled in USD, delivery on June 7th 2020, strike price of 100 USD
            ...
          ]
      }
     ...

The product btcusdtx_usdt_200607C1000000 means a call contract with delivery on June 7th, 2020, at the strike price of 10,000 of the underlying financial instrument BTCUSDX). btcusdtx_usdt_200607P200000 means a put contract with delivery on June 7th, 2020, at the strike price of 2,000 of the underlying financial instrument BTCUSDX).

Returns a comma delimited tradable asset instruments array.

WS Endpoint

wss://api.bitwyre.com/ws/public/instruments

WS Request Fields/Parameters

Query Parameter Data Type Required Remark
"market" string true crypto, equities, fixed_income, or commodities
"product" string true spot, futures, options, or swaps
"country" string true ISO 3166-2 Country Code. Only ID or PA for now

WS Response Types (JSON Array)

JSON Field Data Type Remark
JSON-array string base asset, quote asset, product filter, delimited with an _ (underscore).

WS Ticker

Connecting

websocat -E "wss://api.bitwyre.com/ws/stream"

Streaming Responses (on new ticker)

> {"op": "subscribe", "args": ["ticker:btc_usdt_spot"]}
    < {"success":true,"subscribe":"ticker:btc_usdt_spot","request":{"op":"subscribe","args":["ticker:btc_usdt_spot"]}}
    < {
          "table":"ticker:btc_usdt_spot",
          "keys":["instrument", "asset_base", "asset_quote", "high", "low", "percent_change", "vol_base", "vol_quote", "percent_change", "vol_base", "vol_quote", "last", "best_bid", "best_ask", "timestamp", "market", "product", "is_frozen"],
          "types": {"str", "str", "str", "str", "str", "str", "str", "str", "str", "str", "str", "str", "str", "str", "bool"}
          "action": "insert",
          "data": {
              "instrument": "btc_usdt_spot",
              "asset_base": "btc",
              "asset_quote": "usdt",
              "high": "126989000",
              "low": "115201000",
              "percent_change": "-2.123",
              "vol_base": "611.66499447",
              "vol_quote": "7434324.9431",
              "last": "124783000",
              "best_bid": "124761000",
              "best_ask": "124777000",
              "timestamp": 1571744594571020435,
              "market": "crypto",
              "product": "spot",
              "is_frozen": false
          }
      }
     ...
...

Streams new ticker information for an asset pair, if no asset pair specified the websocket service will stream all instruments ticker.

WS Endpoint

wss://api.bitwyre.com/ws/stream

WS Request Fields/Parameters (during handshake)

Query Parameter Data Type Required Remark
"instrument" string false base asset, quote asset, product filter, delimited with an _ (underscore).

If the instrument paremeter is empty or omitted, will return the ticker data of all available asset instruments.

WS Streaming Data Types (JSON Object)

JSON Field Data Type Remark
"instrument" string base asset, quote asset, product filter, delimited with an _ (underscore).
"asset_base" string base asset in the trade pair
"asset_quote" string quote asset in the trade pair
"high" float-string highest market price in the last 24 hours
"low" float-string lowest market price in the last 24 hours
"percent_change" float-string market price change percentage in the last 24 hours (up to 8 precision).
"vol_base" float-string total market volume of the base asset in the last 24 hours
"vol_quote" float-string total market volume of the quote asset in the last 24 hours
"last" float-string last market price for the base asset
"best_bid" float-string current highest bid price
"best_ask" float-string current lowest ask price
"timestamp" big-integer ticker timestamp, unixtime in nanoseconds
"market" enum-string "spot", "futures", "perpetual_swap", "options"
"is_frozen" boolean market frozen status

WS Trades

Connecting

websocat -E "wss://api.bitwyre.com/ws/stream"

Streaming Responses (on new trade)

> {"op": "subscribe", "args": ["trades:btc_usdt_options"]}
    < {"success":true,"subscribe":"trades:btc_usdt_options","request":{"op":"subscribe","args":["trades:btc_usdt_options"]}}
    < {
          "table":"trades:btc_usdt_options",
          "keys":["instrument", "price", "volume", "value", "side". "id", "timestamp"],
          "types": {"str", "str", "str", "str", "str", "str", "int"}
          "action": "insert",
          "data": {
              "instrument": "btc_usdt_options",
              "price": "9000",
              "volume": "2",
              "value": "18000",
              "side": 1,
              "id": "a911b7c0-e431-424f-9f05-49a8ef0c7d93",
              "timestamp": 1571744594571020435
          }
      }
...

Streams new trade information for an asset pair, if no asset pair specified the websocket service will stream all instruments new trade.

WS Endpoint

wss://api.bitwyre.com/ws/stream

WS Request Fields/Parameters (during handshake)

Query Parameter Data Type Required Remark
"instrument" string false base asset, quote asset, product filter, delimited with an _ (underscore).

WS Streaming Data Types (Array of JSON Object)

JSON Field Data Type Remark
"instrument" string base asset, quote asset, product filter, delimited with an _ (underscore).
"price" float-string price/quote asset of the traded base asset
"volume" float-string volume of the traded base asset
"value" float-string quote value (price x volume)
"side" enum-number trade type ( 1 - buy; 2 - sell )
"id" uuid-string universal unique id of the trade
"timestamp" big-integer trade timestamp, unixtime in nanoseconds

WS Depth L2

Connecting

websocat -E "wss://api.bitwyre.com/ws/stream"

Streaming Responses (on orderbook change)

> {"op": "subscribe", "args": ["depthl2:btc_usdt_spot"]}
    < {"success":true,"subscribe":"depthl2:btc_usdt_spot","request":{"op":"subscribe","args":["depthl2:btc_usdt_spot"]}}
    < {
          "table": "depthl2",
          "action": "snapshot",
          "data": {
            "instrument": "btc_usdt_spot",
            "bids": [
              {
                "price": "41787.99",
                "qty": "0.00019"
              },
              {
                "price": "41786.99",
                "qty": "0.00019"
              },
              {
                "price": "41785.99",
                "qty": "0.00019"
              },
            ],
            "asks": [
              {
                "price": "41893.88",
                "qty": "0.00025"
              },
              {
                "price": "41894.88",
                "qty": "0.00025"
              },
              {
                "price": "41895.88",
                "qty": "0.00025"
              },
            ]
          }
      }
    ...
...

Streams full L2 orderbook data.

WS Endpoint

wss://api.bitwyre.com/ws/stream

WS Request Fields/Parameters (during handshake)

Query Parameter Data Type Required Remark
"instrument" string false base asset, quote asset, product filter, delimited with an _ (underscore).

WS Streaming Data Types (JSON Object)

JSON Field Data Type Remark
"bids" array-of-float-string-tuple current bid orders in the orderbook
"asks" array-of-float-string-tuple current ask orders in the orderbook
"is_frozen" boolean market frozen status

WS Depth L2 Top 25 Snapshot

Connecting

websocat -E "wss://api.bitwyre.com/ws/stream"

Streaming Responses

> {"op": "subscribe", "args": ["depthl2_25:btcusdtx_usdt_200607F1000000"]}
    < {"success":true,"subscribe":"depthl2_25:btcusdtx_usdt_200607F1000000","request":{"op":"subscribe","args":["depthl2_25:btcusdtx_usdt_200607F1000000"]}}
    < {
          "table":"depthl2_25",
          "keys":["instrument", "sequence_number", "bids", "asks", "is_frozen"],
          "types": {"str", "int", "list", "list", "bool"}
          "action": "snapshot",
          "data":{
            "instrument": "btcusdtx_usdt_200607F1000000", 
            "sequence_number": 100000,
            "bids": [["124112000", "0.18154050"], ["1241100