NAV navbar
javascript python ruby

API Overview

Here you can find the basics of interacting with the Bitpowr Developer API.

Through the API your application can create and manage crypto wallets, assets and addresses. Our API is organized around REST, and designed to use resource oriented URLs and HTTP response codes to indicate API errors.

Authentication

Authentication is handled using your public/secret key token or api key included in the Authorization header of each request. Please create an account or contact bitpowr support to get your keys.

Using Public and Secret Key

This uses the public and secret key of your account to gain access to your account using the API. To use this, you would need to concat them in this format {public_key:secret_key} and encode it to base64 encoding before passing to the header. This method gives you admin access to your account and wont be able to restrict keys

Authorization: Bearer <ENCODED_TOKEN>

API Keys

You can create API Keys in your dashboard and use it to authorize your API Requests. You can restrict which account and permissions an API Key access. API Key does not have admin access to your account and should be solely for interacting with specifics accounts.

Authorization: Basic <API_KEY>

Mode/Network

The mode and network of the account basically depends on the keys you are using to authorize. To connect to the MAINNET environment, ensure your keys are for LIVE mode and if you want to test use the TEST keys. In Production, ensure you are using the LIVE keys which make your account interact with the MAINNET NETWORK.

Rate Limiting

If too many requests are received using the same access token, that access token will be throttled. Throttled requests will receive a response with a status code of 429 and will contain a Retry-After header that indicates how many seconds the user should wait before making additional requests. Please design your client to adhere to the Retry-After header, and not the current rate limit.

Sample Throttled Response:

Status: 429
Content-Type: 'application/json'
Retry-After: 60

Supported Blockchains

We currently support 6 public blockchains to be used right from your API and dashboard. We are continously adding new blockchains every day.

Supported Chains

Name Symbols Assets Network Status
Bitcoin BITCOIN (BTC) BTC MAINNET, TESTNET Available
Litecoin LITECOIN (LTC) LTC MAINNET, TESTNET Available
Bitcoin Cash BITCOINCASH (BCH) BCH MAINNET, TESTNET Available
Dogecoin DOGECOIN (DOGE) DOGE MAINNET, TESTNET In Progress
Ethereum ETHEREUM (ETH) ETH, ERC20 (USDC, BUSD, USDT, DAI, LINK) MAINNET, TESTNET (ETH only) Available
Polygon POLYGON (MATIC) MATIC, ERC20 (USDC_MATIC, USDT_MATIC) MAINNET, TESTNET (MATIC only) Available
Binance Smart Chain BSC (BNB) BNB, ERC20 (USDC_BSC, BUSD_BSC) MAINNET, TESTNET (BNB only) Available
Tron TRON (TRX) TRX, ERC20 (USDT_TRON) MAINNET, TESTNET (TRX only) Available
Solana SOLANA (SOL) SOL, SPL tokens MAINNET, TESTNET (SOL only) Available
Terra TERRA (LUNA) LUNA, UST MAINNET, TESTNET (LUNA only) On Hold
Ripple RIPPLE (XRP) XRP MAINNET Comming Soon
Stellar STELLAR (XLM) XLM MAINNET Available
Fantom FANTOM (FTM) FTM MAINNET, TESTNET Comming Soon
Ronin RONIN (RON) RON, SLP MAINNET, TESTNET (RON only) Comming Soon
Celo CELO (CELO) CELO, cUSD, cEUR MAINNET, TESTNET (CELO only) In Progress
Bantu BANTU (XBN) XBN MAINNET, TESTNET Available

Supported Assets

Name Chain Network Status
BTC BITCOIN MAINNET, TESTNET Available
LTC LITECOIN MAINNET, TESTNET Available
BCH BITCOINCASH MAINNET, TESTNET Available
ETH ETHEREUM MAINNET, TESTNET Available
USDC ETHEREUM MAINNET Available
USDT ETHEREUM MAINNET Available
BUSD ETHEREUM MAINNET Available
LINK ETHEREUM MAINNET Available
MATIC POLYGON MAINNET, TESTNET Available
USDC_MATIC POLYGON MAINNET Available
USDT_MATIC POLYGON MAINNET Available
BSC (BNB) BSC MAINNET, TESTNET Available
USDC_BSC BSC MAINNET Available
BUSD_BSC BSC MAINNET Available
TRON (TRX) TRON MAINNET, TESTNET Available
USDT_TRON TRON MAINNET Available
SOL SOLANA MAINNET, TESTNET Available
LUNA TERRA MAINNET, TESTNET On Hold
UST TERRA MAINNET On Hold
XBN BANTU MAINNET, TESTNET Available

Accounts

Create Accounts

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
    "name": "test-asset123",
    "passphrase": "ioetdf0isd08"
    "type": "DEFAULT",
    "showInDashboard": "true",
    "assets": ["BTC", "USDT", "ETH"],
    "externalId": "a821-42b6e7827194" // (optional)
});

var requestOptions = {
    method: 'POST',
    headers: myHeaders,
    body: raw,
    redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/accounts", requestOptions)
    .then(response => response.json())
    .then(result => console.log(result))
    .catch(error => console.log('error', error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/accounts"

payload = json.dumps({
  "name": "test-asset123",
  "passphrase": "ioetdf0isd08",
  "type": "DEFAULT",
  "showInDashboard": "true",
  "assets": ["BTC", "USDT", "ETH"],
  "externalId": "a821-42b6e7827194" #(optional)
})
headers = {
'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/accounts")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"]= "Bearer <encoded>"
request.body = JSON.dump({
    "name": "test-asset123",
    "passphrase": "ioetdf0isd08",
    "type": "DEFAULT",
    "showInDashboard": "true",
    "assets": ["BTC", "USDT", "ETH"],
    "externalId": "a821-42b6e7827194" #(optional)
})

response = http.request(request)
puts response.read_body

200 Response:

{
    "status": "success",
    "data": {
        "uid": "bfbb4394-fd3b-4054-a821-42b6e7827194",
        "externalId": "a821-42b6e7827194",
        "fiatCurrency": "USD",
        "name": "money",
        "type": "DEFAULT",
        "showInDashboard": true,
        "isDeleted": false,
        "isArchived": false,
        "organizationId": "91f55ca6-c413-4ee8-9c4e-197bf9533350",
        "network": "TESTNET",
        "createdAt": "2021-08-18T17:04:14.166Z",
        "mode": "TEST",
        "maxDailyAmount": 10000,
        "maxMonthlyAmount": 100000,
        "maxDailyTransactionsCount": null,
        "maxMonthlyTransactionsCount": null,
        "whiteListAddresses": null,
        "asset": [
            {
                "uid": "d551475d-e460-407b-bd22-76ae39daf05b",
                "guid": "473cbd30-0f3f-4fca-9f06-99c4872f8138",
                "label": "BITCOIN",
                "isDeleted": false,
                "isArchived": false,
                "isContract": false,
                "chain": "BITCOIN",
                "network": "TESTNET",
                "mode": "TEST",
                "assetType": "BTC",
                "autoForwardAddress": null,
                "createdAt": "2022-03-11T02:25:13.643Z"
            }
        ],
        "fiatBalance": {
            "received": "0.00",
            "sent": "0.00",
            "balance": "0.00",
            "pending": "0.00",
            "blocked": "0.00"
        }
    }
}   

This endpoint allow you to create an account with assets

HTTP Request

POST api/v1/accounts

Body Parameters

Parameter Default Description
name required the name of the account/wallet you want to create.
passphrase required just like a passowrd for your wallet/account.
assets [] arrays of assets you want to add to your account/wallet
type DEFAULT DEFAULT/SELF_CUSTODY/SAVINGS/EXCHANGES
showInDashboard false whether to show account/wallet in dashboard
externalId string (optional) external unique id / random generated string
email string required only for SELF_CUSTODY type
customerId string optional only for SELF_CUSTODY type, can be customer name, id, e.t.c ...
isContract optional Smart Contract assets(EVM Chains).

Get Accounts

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/accounts", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/accounts"

payload={}
headers = {
  'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/accounts")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"]= "Bearer <encoded>"
request["Content-Type"] = "application/json"

response = http.request(request)
puts response.read_body

200 Response:::

{
    "status": "success",
    "page": 1,
    "totalPages": 1,
    "data": [
        {
            "uid": "bfbb4394-fd3b-4054-a821-42b6e7827194",
            "externalId": "a821-42b6e7827194",
            "fiatCurrency": "USD",
            "name": "money",
            "type": "DEFAULT",
            "showInDashboard": true,
            "isDeleted": false,
            "isArchived": false,
            "organizationId": "91f55ca6-c413-4ee8-9c4e-197bf9533350",
            "network": "TESTNET",
            "createdAt": "2021-08-18T17:04:14.166Z",
            "mode": "TEST",
            "maxDailyAmount": 10000,
            "maxMonthlyAmount": 100000,
            "maxDailyTransactionsCount": null,
            "maxMonthlyTransactionsCount": null,
            "whiteListAddresses": null,
            "asset": [
                {
                    "uid": "1a14df95-9c66-4966-9968-13416f472ba0",
                    "label": "Bitcoin",
                    "isDeleted": false,
                    "isArchived": false,
                    "organizationId": "91f55ca6-c413-4ee8-9c4e-197bf9533350",
                    "accountId": "bfbb4394-fd3b-4054-a821-42b6e7827194",
                    "assetType": "BTC",
                    "network": "TESTNET",
                    "mode": "TEST",
                    "enableAutoForwarding": false,
                    "autoForwardAddress": null,
                    "createdAt": "2021-08-18T17:04:27.831Z",
                    "balance": {
                        "received": "2098.70",
                        "sent": "0.00",
                        "balance": "2098.70",
                        "pending": "48.46",
                        "blocked": "0.00"
                    }
                },
                {
                    "uid": "49e090c7-1570-4bd1-8710-20e7139b34f5",
                    "label": "Litecoin",
                    "isDeleted": false,
                    "isArchived": false,
                    "organizationId": "91f55ca6-c413-4ee8-9c4e-197bf9533350",
                    "accountId": "bfbb4394-fd3b-4054-a821-42b6e7827194",
                    "assetType": "LTC",
                    "network": "TESTNET",
                    "mode": "TEST",
                    "enableAutoForwarding": false,
                    "autoForwardAddress": null,
                    "createdAt": "2021-08-18T17:16:35.926Z",
                    "balance": {
                        "received": "27.89",
                        "sent": "0.00",
                        "balance": "27.89",
                        "pending": "0.00",
                        "blocked": "0.00"
                    }
                }
            ],
            "fiatBalance": {
                "received": "2126.59",
                "sent": "0.00",
                "balance": "2126.59",
                "pending": "48.46",
                "blocked": "0.00"
            }
        }
    ]
}

This endpoint allow you a get all users accounts/wallets

HTTP Request

GET api/v1/accounts

Get Account

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/accounts/299eedc5-d2a4-4167-91af-4dbd6c708a4a", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/accounts/299eedc5-d2a4-4167-91af-4dbd6c708a4a"

payload = {}
headers = {
  'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/accounts/299eedc5-d2a4-4167-91af-4dbd6c708a4a")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"]= "Bearer <encoded>"
request["Content-Type"] = "application/json"

response = http.request(request)
puts response.read_body

200 Response:::

{
    "status": "success",
    "data": {
        "uid": "bfbb4394-fd3b-4054-a821-42b6e7827194",
        "externalId": "a821-42b6e7827194",
        "fiatCurrency": "USD",
        "name": "money",
        "type": "DEFAULT",
        "showInDashboard": true,
        "isDeleted": false,
        "isArchived": false,
        "organizationId": "91f55ca6-c413-4ee8-9c4e-197bf9533350",
        "network": "TESTNET",
        "createdAt": "2021-08-18T17:04:14.166Z",
        "mode": "TEST",
        "maxDailyAmount": 10000,
        "maxMonthlyAmount": 100000,
        "maxDailyTransactionsCount": null,
        "maxMonthlyTransactionsCount": null,
        "whiteListAddresses": null,
        "asset": [
            {
                "uid": "1a14df95-9c66-4966-9968-13416f472ba0",
                "label": "Bitcoin",
                "isDeleted": false,
                "isArchived": false,
                "organizationId": "91f55ca6-c413-4ee8-9c4e-197bf9533350",
                "accountId": "bfbb4394-fd3b-4054-a821-42b6e7827194",
                "assetType": "BTC",
                "network": "TESTNET",
                "mode": "TEST",
                "enableAutoForwarding": false,
                "autoForwardAddress": null,
                "createdAt": "2021-08-18T17:04:27.831Z",
                "balance": {
                    "received": "2099.02",
                    "sent": "0.00",
                    "balance": "2099.02",
                    "pending": "48.47",
                    "blocked": "0.00"
                }
            }
        ],
        "fiatBalance": {
            "received": "2126.92",
            "sent": "0.00",
            "balance": "2126.92",
            "pending": "48.47",
            "blocked": "0.00"
        }
    }
}

HTTP Request

GET api/v1/accounts/{{uid}}

URL Parameters

Parameter Default Description
uid required the uid of the account/wallet you want retrieve.

Get Account Balance

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/accounts/299eedc5-d2a4-4167-91af-4dbd6c708a4a/balance", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/accounts/299eedc5-d2a4-4167-91af-4dbd6c708a4a/balance"

payload = {}
headers = {
  'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/accounts/299eedc5-d2a4-4167-91af-4dbd6c708a4a/balance")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"]= "Bearer <encoded>"
request["Content-Type"] = "application/json"

response = http.request(request)
puts response.read_body

200 Response:::

{
    "status": "success",
    "data": {
        "received": "2125.46",
        "sent": "0.00",
        "balance": "2125.46",
        "pending": "48.44",
        "blocked": "0.00"
    }
}

HTTP Request

GET api/v1/accounts/{{uid}}/balance

URL Parameters

Parameter Default Description
uid required the uid of the account/wallet you want retrieve.

Get Account Transactions

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var raw = "{\r\n    \r\n}";

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/accounts/326b47a1-da25-45e9-af9f-ae3e440ea7f4/transactions", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://developers.bitpowr.com/api/v1/accounts/326b47a1-da25-45e9-af9f-ae3e440ea7f4/transactions"

payload = "{\r\n    \r\n}"
headers = {
   'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/accounts/326b47a1-da25-45e9-af9f-ae3e440ea7f4/transactions")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <encoded>"
request["Content-Type"] = "application/json"
request.body = "{\r\n    \r\n}"

response = http.request(request)
puts response.read_body

200 Response::

{
    "status": "success",
    "data": [
        {
            "uid": "ed27509f-6d0b-4390-a7ce-94323e8e81fb",
            "guid": "4b63ca22-2b21-4891-bfba-2683384084f4",
            "status": "SUCCESS",
            "type": "DEPOSIT",
            "hash": "00000000b7a97b9b783bafa7df0847d8473256509c5d7054a3d006e8640b59be",
            "confirmation": 1,
            "depositId": "f02ac546-299b-4d3c-9512-f90e5ab9a764",
            "transferId": null,
            "address": "mhHkYXiiXPzqc1Y2gGK3oBV3FVbEaEZ84b",
            "transactionRef": "TRX-WOmI35fPZ9I#Lh2kD1Ks4et0PKnOu1",
            "fromAddress": null,
            "mode": "TEST",
            "description": null,
            "amount": "0.001",
            "dollarRate": "44380.27",
            "dollarAmount": "44.38027",
            "assetId": "1a14df95-9c66-4966-9968-13416f472ba0",
            "accountId": "bfbb4394-fd3b-4054-a821-42b6e7827194",
            "createdAt": "2021-08-19T10:57:20.095Z",
            "updatedAt": "2021-08-19T10:57:20.172Z",
            "completedAt": "2021-08-19T10:57:20.172Z",
            "cancelledAt": null
        },
    ]
}

This endpoints allows you to get balance of an address

HTTP Request

GET api/v1/accounts/{{uid}}/transactions

URL Parameters

Parameter Default Description
uid required the uid of the account/wallet you want retrieve.

Get Account Transaction

var myHeaders = new Headers();

myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var raw = "{\r\n    \r\n}";

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/accounts/326b47a1-da25-45e9-af9f-ae3e440ea7f4/transactions/ae866891-9629-4bbf-85c0-9753ebbf57c9", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://developers.bitpowr.com/api/v1/accounts/326b47a1-da25-45e9-af9f-ae3e440ea7f4/transactions/ae866891-9629-4bbf-85c0-9753ebbf57c9"

payload = "{\r\n    \r\n}"
headers = {
  'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/accounts/326b47a1-da25-45e9-af9f-ae3e440ea7f4/transactions/ae866891-9629-4bbf-85c0-9753ebbf57c9")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <encoded>"
request["Content-Type"] = "application/json"
request.body = "{\r\n    \r\n}"

response = http.request(request)
puts response.read_body

200 Response::

{
    "status": "success",
    "data": {
        "uid": "ed27509f-6d0b-4390-a7ce-94323e8e81fb",
        "guid": "4b63ca22-2b21-4891-bfba-2683384084f4",
        "status": "SUCCESS",
        "type": "DEPOSIT",
        "hash": "00000000b7a97b9b783bafa7df0847d8473256509c5d7054a3d006e8640b59be",
        "confirmation": 1,
        "depositId": "f02ac546-299b-4d3c-9512-f90e5ab9a764",
        "transferId": null,
        "address": "mhHkYXiiXPzqc1Y2gGK3oBV3FVbEaEZ84b",
        "transactionRef": "TRX-WOmI35fPZ9I#Lh2kD1Ks4et0PKnOu1",
        "fromAddress": null,
        "mode": "TEST",
        "description": null,
        "amount": "0.001",
        "dollarRate": "44380.27",
        "dollarAmount": "44.38027",
        "assetId": "1a14df95-9c66-4966-9968-13416f472ba0",
        "accountId": "bfbb4394-fd3b-4054-a821-42b6e7827194",
        "createdAt": "2021-08-19T10:57:20.095Z",
        "updatedAt": "2021-08-19T10:57:20.172Z",
        "completedAt": "2021-08-19T10:57:20.172Z",
        "cancelledAt": null
    }
}

HTTP Request

GET api/v1/accounts/{{uid}}/transactions/{{txId}}

URL Parameters

Parameter Default Description
uid required the uid of the account/wallet you want retrieve.
txId required the txId of the account/wallet you want retrieve.

Add Asset to Account

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "label": "test-asset11",
  "asset": "LTC"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/accounts/299eedc5-d2a4-4167-91af-4dbd6c708a4a/assets", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/accounts/299eedc5-d2a4-4167-91af-4dbd6c708a4a/assets"

payload = json.dumps({
  "label": "test-asset11",
  "asset": "LTC"
})
headers = {
  'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/accounts/299eedc5-d2a4-4167-91af-4dbd6c708a4a/assets")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"]= "Bearer <encoded>"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "label": "test-asset11",
  "asset": "LTC"
})

response = http.request(request)
puts response.read_body

200 Response:::

{
    "status": "success",
    "message": "success",
    "data": {
            "uid": "8b1ed58c-1f70-4535-aff0-fe4a26c5920e",
            "guid": "495b9866-8786-4ead-bd8e-ad74190f2968",
            "label": "btc",
            "isDeleted": false,
            "isArchived": false,
            "organizationId": "62d3c68b-8bd0-46c3-bac6-9327ecb5fd92",
            "accountId": "d3fe176c-0904-4725-9739-4c790d900e83",
            "assetType": "BCH",
            "source": "API",
            "network": "TESTNET",
            "enableAutoForwarding": false,
            "autoForwardAddress": null,
            "createdAt": "2021-07-17T00:03:03.996Z",
        }
}

HTTP Request

POST /api/v1/accounts/{{uid}}/assets

URL Parameters

Parameter Default Description
uid required the uid of the account/wallet you want to create assets for.

Body Parameters

Parameter Default Description
label null the label of the Asset you want to Add.
asset "BTC" the asset you want to add (BTC,USDT,LTC,BCH)
isContract optional Smart Contract assets(EVM Chains).

Get Account Assets

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");


var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/accounts/299eedc5-d2a4-4167-91af-4dbd6c708a4a/assets", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/accounts/299eedc5-d2a4-4167-91af-4dbd6c708a4a/assets"

payload = {}

headers = {
  'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/accounts/299eedc5-d2a4-4167-91af-4dbd6c708a4a/assets")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"]= "Bearer <encoded>"
request["Content-Type"] = "application/json"

response = http.request(request)
puts response.read_body

200 Response:::


{
    "status": "success",
    "data": [
        {
            "uid": "1a14df95-9c66-4966-9968-13416f472ba0",
            "label": "Bitcoin",
            "isDeleted": false,
            "isArchived": false,
            "organizationId": "91f55ca6-c413-4ee8-9c4e-197bf9533350",
            "accountId": "bfbb4394-fd3b-4054-a821-42b6e7827194",
            "assetType": "BTC",
            "network": "TESTNET",
            "mode": "TEST",
            "enableAutoForwarding": false,
            "autoForwardAddress": null,
            "createdAt": "2021-08-18T17:04:27.831Z",
            "balance": {
                "received": "2084.30",
                "sent": "0.00",
                "balance": "2084.30",
                "pending": "48.13",
                "blocked": "0.00"
            }
        },
    ]
}

HTTP Request

GET /api/v1/accounts/{{uid}}/assets

URL Parameters

Parameter Default Description
uid required the uid of the account/wallet you want to get assets.

Get Account Asset

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/accounts/299eedc5-d2a4-4167-91af-4dbd6c708a4a/assets/e5e29aea-6afe-4a91-9bab-23d3b5fb2715", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://developers.bitpowr.com/api/v1/accounts/299eedc5-d2a4-4167-91af-4dbd6c708a4a/assets/e5e29aea-6afe-4a91-9bab-23d3b5fb2715"

headers = {
  'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers)

print(response.text)
require "uri"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/accounts/299eedc5-d2a4-4167-91af-4dbd6c708a4a/assets/e5e29aea-6afe-4a91-9bab-23d3b5fb2715")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"]= "Bearer <encoded>"
request["Content-Type"] = "application/json"

response = http.request(request)
puts response.read_body

200 Response:::

{
    "status": "success",
    "message": "success",
    "data": {
        "uid": "1a14df95-9c66-4966-9968-13416f472ba0",
        "label": "Bitcoin",
        "isDeleted": false,
        "isArchived": false,
        "organizationId": "91f55ca6-c413-4ee8-9c4e-197bf9533350",
        "accountId": "bfbb4394-fd3b-4054-a821-42b6e7827194",
        "assetType": "BTC",
        "network": "TESTNET",
        "mode": "TEST",
        "enableAutoForwarding": false,
        "autoForwardAddress": null,
        "createdAt": "2021-08-18T17:04:27.831Z",
        "balance": {
            "received": "2084.30",
            "sent": "0.00",
            "balance": "2084.30",
            "pending": "48.13",
            "blocked": "0.00"
        }
    }   
}

HTTP Request

GET /api/v1/accounts/{{uid}}/assets/{{assetId}}

URL Parameters

Parameter Default Description
uid required the uid of the account/wallet you want to get assets.
assetId required assets you want to query

Create Sub Account

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "name": "test-wallet123",
  "externalId": "8be77454-cf2d-48d3-",
  "metaData": {}
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/accounts/50ff235b-14e3-4cf6-a03f-1602bbceeb56/sub-accounts", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/accounts/50ff235b-14e3-4cf6-a03f-1602bbceeb56/sub-accounts"

payload = json.dumps({
  "name": "test-wallet123",
  "externalId": "8be77454-cf2d-48d3",
  "metaData": {}
})

headers = {=
  'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/accounts/50ff235b-14e3-4cf6-a03f-1602bbceeb56/sub-accounts")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <encoded>"
request["Content-Type"] = "application/json"

request.body = JSON.dump({
  "name": "test-wallet123",
  "externalId": "8be77454-cf2d-48d3",
  "metaData": {}
})

response = http.request(request)
puts response.read_body

200 response

{
    "status": "success",
    "data": {
        "uid": "42d38cd2-4034-4cc7-a117-371b9011b426",
        "name": "test-wallet123",
        "externalId": "optional",
        "isDeleted": false,
        "isArchived": false,
        "organizationId": "44c4a17d-528d-405e-80c2-0f02f45360a1",
        "network": "TESTNET",
        "createdAt": "2021-09-17T11:06:21.314Z",
        "mode": "TEST",
        "addresses": [
            {}
        ]
    }
}

HTTP Request

POST /api/v1/accounts/{{uid}}/sub-accounts

URL Parameters

Parameter Default Description
uid required the uid of the account/wallet you want to create a sub account for.

Body Parameters

Parameter Default Description
name required the label of the Sub Account you want to Add.
externalId required unique string (e.g user id)
autoGenerateAddress false generate addresses for all available asset on the parent account.
metaData empty object extra data

Get Sub Accounts

var myHeaders = new Headers();

myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "name": "test-wallet123",
  "externalId": "optional",
  "metaData": {}
});

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/accounts/50ff235b-14e3-4cf6-a03f-1602bbceeb56/sub-accounts", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/accounts/50ff235b-14e3-4cf6-a03f-1602bbceeb56/sub-accounts"

payload = json.dumps({
  "name": "test-wallet123",
  "externalId": "optional",
  "metaData": {}
})
headers = {
  'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/accounts/50ff235b-14e3-4cf6-a03f-1602bbceeb56/sub-accounts")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)

request["Authorization"] = "Bearer <encoded>"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "name": "test-wallet123",
  "externalId": "optional",
  "metaData": {}
})

response = http.request(request)
puts response.read_body

200 response

{
    "status": "success",
    "data": [
        {
            "uid": "8176596b-96cd-4248-873b-a04f7c31a87a",
            "name": "test-wallet123",
            "externalId": "optional",
            "isDeleted": false,
            "isArchived": false,
            "organizationId": "44c4a17d-528d-405e-80c2-0f02f45360a1",
            "network": "TESTNET",
            "createdAt": "2021-09-17T09:51:38.793Z",
            "mode": "TEST",
            "Address": []
        },
        {
            "uid": "a6647095-30d3-490c-9bc1-726d62d35617",
            "name": "test-wallet123",
            "externalId": "optional",
            "isDeleted": false,
            "isArchived": false,
            "organizationId": "44c4a17d-528d-405e-80c2-0f02f45360a1",
            "network": "TESTNET",
            "createdAt": "2021-09-17T10:04:28.651Z",
            "mode": "TEST",
            "Address": [
                {
                    "uid": "61ec879c-ee55-40b3-b6cb-a36ce8694db8",
                    "address": "mrnVQqL1qHVz1K6JcsuHdiRrnTPZw2Su4n",
                    "addressRef": "gWq03bWHYr",
                    "autoForwardAddress": null,
                    "network": "TESTNET",
                    "assetType": "BTC",
                    "assetId": null,
                    "organizationId": "44c4a17d-528d-405e-80c2-0f02f45360a1",
                    "used": false,
                    "lastUsedAt": null,
                    "createdAt": "2021-09-17T10:04:32.489Z"
                },
                {
                    "uid": "6be94f7a-4e04-4f40-9010-72f0807d9cb9",
                    "address": "bchtest:qquzz5m3n8w0zfelazspqzmpdweaqxkj95dnkel9z6",
                    "addressRef": "l2E6jPYFdp",
                    "autoForwardAddress": null,
                    "network": "TESTNET",
                    "assetType": "BCH",
                    "assetId": null,
                    "organizationId": "44c4a17d-528d-405e-80c2-0f02f45360a1",
                    "used": false,
                    "lastUsedAt": null,
                    "createdAt": "2021-09-17T10:04:32.489Z"
                }
            ]
        }
    ]
}

HTTP Request

GET /api/v1/accounts/{{uid}}/sub-accounts

URL Parameters

Parameter Default Description
uid required the uid of the account/wallet you want to create a sub account for.

Body Parameters

Get Sub Account

var myHeaders = new Headers();

myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "name": "test-wallet123",
  "externalId": "optional",
  "metaData": {}
});

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/accounts/50ff235b-14e3-4cf6-a03f-1602bbceeb56/sub-accounts/a6647095-30d3-490c-9bc1-726d62d35617", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/accounts/50ff235b-14e3-4cf6-a03f-1602bbceeb56/sub-accounts/a6647095-30d3-490c-9bc1-726d62d35617"

payload = json.dumps({
  "name": "test-wallet123",
  "externalId": "optional",
  "metaData": {}
})
headers = {
  'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/accounts/50ff235b-14e3-4cf6-a03f-1602bbceeb56/sub-accounts/a6647095-30d3-490c-9bc1-726d62d35617")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)

request["Authorization"] = "Bearer <encoded>"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "name": "test-wallet123",
  "externalId": "optional",
  "metaData": {}
})

response = http.request(request)
puts response.read_body

200 response

{
    "status": "success",
    "data": {
        "uid": "a6647095-30d3-490c-9bc1-726d62d35617",
        "name": "test-wallet123",
        "externalId": "optional",
        "isDeleted": false,
        "isArchived": false,
        "organizationId": "44c4a17d-528d-405e-80c2-0f02f45360a1",
        "network": "TESTNET",
        "createdAt": "2021-09-17T10:04:28.651Z",
        "updatedAt": "2021-09-17T10:04:28.652Z",
        "mode": "TEST",
        "Address": [
            {
                "uid": "61ec879c-ee55-40b3-b6cb-a36ce8694db8",
                "address": "mrnVQqL1qHVz1K6JcsuHdiRrnTPZw2Su4n",
                "addressRef": "gWq03bWHYr",
                "autoForwardAddress": null,
                "network": "TESTNET",
                "assetType": "BTC",
                "assetId": null,
                "organizationId": "44c4a17d-528d-405e-80c2-0f02f45360a1",
                "used": false,
                "lastUsedAt": null,
                "createdAt": "2021-09-17T10:04:32.489Z"
            },
            {
                "uid": "6be94f7a-4e04-4f40-9010-72f0807d9cb9",
                "address": "bchtest:qquzz5m3n8w0zfelazspqzmpdweaqxkj95dnkel9z6",
                "addressRef": "l2E6jPYFdp",
                "autoForwardAddress": null,
                "network": "TESTNET",
                "assetType": "BCH",
                "assetId": null,
                "organizationId": "44c4a17d-528d-405e-80c2-0f02f45360a1",
                "used": false,
                "lastUsedAt": null,
                "createdAt": "2021-09-17T10:04:32.489Z"
            }
        ]
    }
}

HTTP Request

GET /api/v1/accounts/{{uid}}/sub-accounts/{{subId}}

URL Parameters

Parameter Default Description
uid required the uid of the account/wallet you want to create assets for.
subId required the uid of the sub account you want to access.

Body Parameters

Sub Account Balance

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({});

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/accounts/50ff235b-14e3-4cf6-a03f-1602bbceeb56/sub-accounts/a6647095-30d3-490c-9bc1-726d62d35617/balance", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/accounts/50ff235b-14e3-4cf6-a03f-1602bbceeb56/sub-accounts/a6647095-30d3-490c-9bc1-726d62d35617/balance"

payload = json.dumps({})

headers = {
  'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/accounts/50ff235b-14e3-4cf6-a03f-1602bbceeb56/sub-accounts/a6647095-30d3-490c-9bc1-726d62d35617/balance")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)

request["Authorization"] = "Bearer <encoded>"
request["Content-Type"] = "application/json"

request.body = JSON.dump({})

response = http.request(request)
puts response.read_body

200 response

{
    "status": "success",
    "data": {
        "received": "0.00",
        "sent": "0.00",
        "balance": "0.00",
        "pending": "0.00",
        "blocked": "0.00"
    }
}

HTTP Request

GET /api/v1/accounts/{{uid}}/sub-accounts/{{subId}}/balance

URL Parameters

Parameter Default Description
uid required the uid of the account/wallet .
subId required the uid of the sub account you want to access.

Body Parameters

GET Sub Account Addresses

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({});

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/accounts/50ff235b-14e3-4cf6-a03f-1602bbceeb56/sub-accounts/a6647095-30d3-490c-9bc1-726d62d35617/addresses", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/accounts/50ff235b-14e3-4cf6-a03f-1602bbceeb56/sub-accounts/a6647095-30d3-490c-9bc1-726d62d35617/addresses"

payload = json.dumps({})

headers = {
  'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/accounts/50ff235b-14e3-4cf6-a03f-1602bbceeb56/sub-accounts/a6647095-30d3-490c-9bc1-726d62d35617/addresses")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)

request["Authorization"] = "Bearer <encoded>"
request["Content-Type"] = "application/json"

request.body = JSON.dump({})

response = http.request(request)
puts response.read_body

200 response

{
    "status": "success",
    "page": 1,
    "totalPages": 1,
    "data": [
        {
          "uid": "e912110f-2cba-4bf7-b063-e93ddf428722",
          "address": "n3TdwXSubjAKoJTaBuVrun8hcpusPt4sq4",
          "addressRef": "wccUkWHsK7",
          "autoForwardAddress": null,
          "network": "TESTNET",
          "assetType": "BTC",
          "isChangeAddress": false,
          "isContract": false,
          "chain": "BITCOIN",
          "assetId": "a2888c03-e412-4e30-aa22-dfd7eb23c6a6",
          "organizationId": "93d65302-f671-4ec6-9c55-f2b0af3bc874",
          "subAccountId": null,
          "used": false,
          "lastUsedAt": null,
          "createdAt": "2022-03-11T01:42:06.761Z"
        },
        {},
        {},
    ]
}

HTTP Request

GET /api/v1/accounts/{{uid}}/sub-accounts/{{subId}}/addresses

URL Parameters

Parameter Default Description
uid required the uid of the account/wallet .
subId required the uid of the sub account you want to access.

Body Parameters

Create Sub Account Address

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "label": "test-asset11",
  "asset": "BBTC"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/accounts/50ff235b-14e3-4cf6-a03f-1602bbceeb56/sub-accounts/a6647095-30d3-490c-9bc1-726d62d35617/addresses", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/accounts/50ff235b-14e3-4cf6-a03f-1602bbceeb56/sub-accounts/a6647095-30d3-490c-9bc1-726d62d35617/addresses"

payload = json.dumps({
  "label": "test-asset11",
  "asset": "BBTC"
})

headers = {
   'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/accounts/50ff235b-14e3-4cf6-a03f-1602bbceeb56/sub-accounts/a6647095-30d3-490c-9bc1-726d62d35617/addresses")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)

request["Authorization"] = "Bearer <encoded>"
request["Content-Type"] = "application/json"

request.body = JSON.dump({
  "label": "test-asset11",
  "asset": "BTC"
})

response = http.request(request)
puts response.read_body

200 response

{
    "status": "success",
    "data": {
        "uid": "e912110f-2cba-4bf7-b063-e93ddf428722",
        "address": "n3TdwXSubjAKoJTaBuVrun8hcpusPt4sq4",
        "addressRef": "wccUkWHsK7",
        "autoForwardAddress": null,
        "network": "TESTNET",
        "assetType": "BTC",
        "isChangeAddress": false,
        "isContract": false,
        "chain": "BITCOIN",
        "assetId": "a2888c03-e412-4e30-aa22-dfd7eb23c6a6",
        "organizationId": "93d65302-f671-4ec6-9c55-f2b0af3bc874",
        "subAccountId": null,
        "used": false,
        "lastUsedAt": null,
        "createdAt": "2022-03-11T01:42:06.761Z"
    }
}

HTTP Request

POST /api/v1/accounts/{{uid}}/sub-accounts/{{subId}}/addresses

URL Parameters

Parameter Default Description
uid required the uid of the account/wallet.
subId required the uid of the sub account you want to access.
addressType legacy segwit, wrappedsegwit, legacy
derivationIndex optional address derivation index - default(last derivationIndex + 1)
enableNativeToken false (optional) used by None native asset token to generate native token addresses along side requested none token address

Body Parameters

Assets

Create Assets

 var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "label": "test-asset11",
  "asset": "ETH",
  "accountId": "299eedc5-d2a4-4167-91af-4dbd6c708a4a"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/assets", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/assets"

payload = json.dumps({
  "label": "test-asset11",
  "asset": "ETH",
  "accountId": "299eedc5-d2a4-4167-91af-4dbd6c708a4a"
})
headers = {
  'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/assets")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"]= "Bearer <encoded>"

request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "label": "test-asset11",
  "asset": "ETH",
  "accountId": "299eedc5-d2a4-4167-91af-4dbd6c708a4a"
})

response = http.request(request)
puts response.read_body

200 Response:::

{
    "status": "success",
    "message": "success",
    "data": {
        "uid": "49e090c7-1570-4bd1-8710-20e7139b34f5",
        "label": "Litecoin",
        "isDeleted": false,
        "isArchived": false,
        "organizationId": "91f55ca6-c413-4ee8-9c4e-197bf9533350",
        "accountId": "bfbb4394-fd3b-4054-a821-42b6e7827194",
        "assetType": "LTC",
        "network": "TESTNET",
        "mode": "TEST",
        "enableAutoForwarding": false,
        "autoForwardAddress": null,
        "createdAt": "2021-08-18T17:16:35.926Z",
        "balance": {
            "received": "0.00",
            "sent": "0.00",
            "balance": "0.00",
            "pending": "0.00",
            "blocked": "0.00"
        }
    }
}

This endpoint allow you to create Assets

HTTP Request

POST api/v1/assets

Body Parameters

Parameter Default Description
label null the label of the Asset you want to Add.
asset "BTC" the asset you want to add (BTC,USDT,LTC,BCH)
accountId required the uid of the account/wallet you want to create assets for.
isContract optional Smart Contract assets(EVM Chains).

Get Assets

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/assets/?accountId=299eedc5-d2a4-4167-91af-4dbd6c708a4a", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/assets/?accountId=299eedc5-d2a4-4167-91af-4dbd6c708a4a"

payload = {}
headers = {
  'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/assets/?accountId=299eedc5-d2a4-4167-91af-4dbd6c708a4a")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"]= "Bearer <encoded>"
request["Content-Type"] = "application/json"

response = http.request(request)
puts response.read_body

200 Response::

 
{
    "status": "success",
    "page": 1,
    "totalPages": 1,
    "data": [
        {
            "uid": "1a14df95-9c66-4966-9968-13416f472ba0",
            "label": "Bitcoin",
            "isDeleted": false,
            "isArchived": false,
            "organizationId": "91f55ca6-c413-4ee8-9c4e-197bf9533350",
            "accountId": "bfbb4394-fd3b-4054-a821-42b6e7827194",
            "assetType": "BTC",
            "network": "TESTNET",
            "mode": "TEST",
            "enableAutoForwarding": false,
            "autoForwardAddress": null,
            "createdAt": "2021-08-18T17:04:27.831Z",
            "balance": {
                "received": "2086.03",
                "sent": "0.00",
                "balance": "2086.03",
                "pending": "48.17",
                "blocked": "0.00"
            }
        },
        {
            "uid": "49e090c7-1570-4bd1-8710-20e7139b34f5",
            "label": "Litecoin",
            "isDeleted": false,
            "isArchived": false,
            "organizationId": "91f55ca6-c413-4ee8-9c4e-197bf9533350",
            "accountId": "bfbb4394-fd3b-4054-a821-42b6e7827194",
            "assetType": "LTC",
            "network": "TESTNET",
            "mode": "TEST",
            "enableAutoForwarding": false,
            "autoForwardAddress": null,
            "createdAt": "2021-08-18T17:16:35.926Z",
            "balance": {
                "received": "27.77",
                "sent": "0.00",
                "balance": "27.77",
                "pending": "0.00",
                "blocked": "0.00"
            }
        }
    ]
}

This endpoint allow you a get all Assets in an Accounts/wallets

HTTP Request

GET api/v1/assets/?accountId={{accountId}}

Body Parameters

Parameter Default Description
accountId required the uid of the account/wallet you want to get assets.

Get Asset

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/assets/e5e29aea-6afe-4a91-9bab-23d3b5fb2715", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://developers.bitpowr.com/api/v1/assets/e5e29aea-6afe-4a91-9bab-23d3b5fb2715"

payload = {}
headers = {
  'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

require "uri"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/assets/e5e29aea-6afe-4a91-9bab-23d3b5fb2715")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"]= "Bearer <encoded>"
request["Content-Type"] = "application/json"

response = http.request(request)
puts response.read_body

200 Response:::

{
    "status": "success",
    "data": {
        "uid": "1a14df95-9c66-4966-9968-13416f472ba0",
        "label": "Bitcoin",
        "isDeleted": false,
        "isArchived": false,
        "organizationId": "91f55ca6-c413-4ee8-9c4e-197bf9533350",
        "accountId": "bfbb4394-fd3b-4054-a821-42b6e7827194",
        "assetType": "BTC",
        "network": "TESTNET",
        "mode": "TEST",
        "enableAutoForwarding": false,
        "autoForwardAddress": null,
        "createdAt": "2021-08-18T17:04:27.831Z",
        "balance": {
            "received": "2087.82",
            "sent": "0.00",
            "balance": "2087.82",
            "pending": "48.21",
            "blocked": "0.00"
        }
    }
}

This endpoint allow you to get an Asset

HTTP Request

GET api/v1/assets/{{assetId}}

URL Parameters

Parameter Default Description
uid required the uid of the account/wallet you want to get assets.

Get Asset Balance

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");


var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/assets/e5e29aea-6afe-4a91-9bab-23d3b5fb2715/balance", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://developers.bitpowr.com/api/v1/assets/e5e29aea-6afe-4a91-9bab-23d3b5fb2715/balance"

payload={}
headers = {
  'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

require "uri"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/assets/e5e29aea-6afe-4a91-9bab-23d3b5fb2715/balance")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"]= "Bearer <encoded>"
request["Content-Type"] = "application/json"

response = http.request(request)
puts response.read_body

200 Response:::

{
    "status": "success",
    "data": {
        "received": "2087.82",
        "sent": "0.00",
        "balance": "2087.82",
        "pending": "48.21",
        "blocked": "0.00"
    }
}

This endpoint allow you to get Asset Balance

HTTP Request

GET api/v1/assets/{{assetId}}/balance

Headers

Query Parameters

null parameters

Get Asset Transactions

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");


var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/assets/7bc33e73-5fd8-4647-aaef-75ca793cc35d/transactions", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://developers.bitpowr.com/api/v1/assets/7bc33e73-5fd8-4647-aaef-75ca793cc35d/transactions"

payload={}
headers = {
  'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/assets/7bc33e73-5fd8-4647-aaef-75ca793cc35d/transactions")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"]= "Bearer <encoded>"
request["Content-Type"] = "application/json"

response = http.request(request)
puts response.read_body

200 Response:::

{
    "status": "success",
    "data": [
        {
            "uid": "ed27509f-6d0b-4390-a7ce-94323e8e81fb",
            "guid": "4b63ca22-2b21-4891-bfba-2683384084f4",
            "status": "SUCCESS",
            "type": "DEPOSIT",
            "hash": "00000000b7a97b9b783bafa7df0847d8473256509c5d7054a3d006e8640b59be",
            "confirmation": 1,
            "depositId": "f02ac546-299b-4d3c-9512-f90e5ab9a764",
            "transferId": null,
            "address": "mhHkYXiiXPzqc1Y2gGK3oBV3FVbEaEZ84b",
            "transactionRef": "TRX-WOmI35fPZ9I#Lh2kD1Ks4et0PKnOu1",
            "fromAddress": null,
            "mode": "TEST",
            "description": null,
            "amount": "0.001",
            "dollarRate": "44380.27",
            "dollarAmount": "44.38027",
            "assetId": "1a14df95-9c66-4966-9968-13416f472ba0",
            "accountId": "bfbb4394-fd3b-4054-a821-42b6e7827194",
            "createdAt": "2021-08-19T10:57:20.095Z",
            "updatedAt": "2021-08-19T10:57:20.172Z",
            "completedAt": "2021-08-19T10:57:20.172Z",
            "cancelledAt": null
        },
        {
            "uid": "2b011d1d-90d9-4800-8a72-89ad933947e3",
            "guid": "a1b225ac-d252-404e-8ba9-cf595a0470fe",
            "status": "SUCCESS",
            "type": "DEPOSIT",
            "hash": "00000000b7a97b9b783bafa7df0847d8473256509c5d7054a3d006e8640b59be",
            "confirmation": 1,
            "depositId": "82f9e1a4-4533-4255-b38e-87ce5ca2f7c6",
            "transferId": null,
            "address": "mhHkYXiiXPzqc1Y2gGK3oBV3FVbEaEZ84b",
            "transactionRef": "TRX-jK8bXJi9kcXAPkZbsKFWJuyNPkX7hl",
            "fromAddress": null,
            "mode": "TEST",
            "description": null,
            "amount": "0.001",
            "dollarRate": "44398.79",
            "dollarAmount": "44.39879000000001",
            "assetId": "1a14df95-9c66-4966-9968-13416f472ba0",
            "accountId": "bfbb4394-fd3b-4054-a821-42b6e7827194",
            "createdAt": "2021-08-19T10:57:34.708Z",
            "updatedAt": "2021-08-19T10:57:34.772Z",
            "completedAt": "2021-08-19T10:57:34.772Z",
            "cancelledAt": null
        },  
    ]
}

This endpoint allow you to get Asset Transactions

HTTP Request

GET api/v1/assets/{{assetId}}/transactions

Headers

Query Parameters

null parameters

Addresses

Generate New Address

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "label": "test-asset11",
  "asset": "BBTC",
  "accountId": "e7ef22e5-ae8f-4305-98bc-73995cface34"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/addresses", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/addresses"

payload = json.dumps({
  "label": "test-asset11",
  "asset": "BBTC",
  "accountId": "e7ef22e5-ae8f-4305-98bc-73995cface34"
})
headers = {
   'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/addresses")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <encoded>"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "label": "test-asset11",
  "asset": "BBTC",
  "accountId": "e7ef22e5-ae8f-4305-98bc-73995cface34"
})

response = http.request(request)
puts response.read_body

200 Response::

{
    "status": "success",
    "data": {
        "uid": "e912110f-2cba-4bf7-b063-e93ddf428722",
        "address": "n3TdwXSubjAKoJTaBuVrun8hcpusPt4sq4",
        "addressRef": "wccUkWHsK7",
        "autoForwardAddress": null,
        "network": "TESTNET",
        "assetType": "BTC",
        "isChangeAddress": false,
        "isContract": false,
        "chain": "BITCOIN",
        "assetId": "a2888c03-e412-4e30-aa22-dfd7eb23c6a6",
        "organizationId": "93d65302-f671-4ec6-9c55-f2b0af3bc874",
        "subAccountId": null,
        "used": false,
        "lastUsedAt": null,
        "createdAt": "2022-03-11T01:42:06.761Z"
    }
}

This endpoints allows you to generate new addresses

HTTP Request

POST api/v1/addresses

Headers

refer to Authentication

Body Parameters

Parameter Default Description
label required unique identifier (uid, e.tc).
asset optional asset identifier you want to add e.g (BTC, LTC, ETH, BSC, USDT)
accountId required the uid of the account/wallet you want retrieve.
addressType legacy segwit, wrappedsegwit, legacy
derivationIndex optional address derivation index - default(last derivationIndex + 1)
enableNativeToken false (optional) used by None native asset token to generate native token addresses along side requested none token address
deploymentParams optional Smart Contract config params for address depployment e.g { "autoFlush": true, "autoDeploy": false: "autoFlushErc20": true }

Get Addresses

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var raw = "";

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/addresses?assetId=4c73e806-5eaf-42f3-b914-20db949be181", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/addresses?assetId=4c73e806-5eaf-42f3-b914-20db949be181"

payload = ""
headers = {
   'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/addresses?assetId=4c73e806-5eaf-42f3-b914-20db949be181")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <encoded>"
request["Content-Type"] = "application/json"

response = http.request(request)
puts response.read_body

200 Response::

{
    "status": "success",
    "page": 1,
    "totalPages": 1,
    "data": [
        {
            "uid": "e912110f-2cba-4bf7-b063-e93ddf428722",
            "address": "n3TdwXSubjAKoJTaBuVrun8hcpusPt4sq4",
            "addressRef": "wccUkWHsK7",
            "autoForwardAddress": null,
            "network": "TESTNET",
            "assetType": "BTC",
            "isChangeAddress": false,
            "isContract": false,
            "chain": "BITCOIN",
            "assetId": "a2888c03-e412-4e30-aa22-dfd7eb23c6a6",
            "organizationId": "93d65302-f671-4ec6-9c55-f2b0af3bc874",
            "subAccountId": null,
            "used": false,
            "lastUsedAt": null,
            "createdAt": "2022-03-11T01:42:06.761Z"
        }
        {}
    ]
}

This endpoints allows you to get addresses of an assetId

HTTP Request

GET api/v1/addresses?assetId={{assetId}}&accountId={{accountId}}&subAccountId={{subAccountId}}

Headers

refer to Authentication

Query Parameters

Parameter Default Description
accountId optional the uid of the account/wallet.
subAccountId optional the uid of the sub-account.
assetId optional the uid of the asset.

Get Address

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var raw = ""

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/addresses/c51c5844-e7fa-4203-bb69-c5963f6e4dbb", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/addresses/c51c5844-e7fa-4203-bb69-c5963f6e4dbb"

payload = ""

headers = {
   'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/addresses/c51c5844-e7fa-4203-bb69-c5963f6e4dbb")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <encoded>"
request["Content-Type"] = "application/json"

response = http.request(request)
puts response.read_body

200 Response::

{
    "status": "success",
    "data": {
        "uid": "e912110f-2cba-4bf7-b063-e93ddf428722",
        "address": "n3TdwXSubjAKoJTaBuVrun8hcpusPt4sq4",
        "addressRef": "wccUkWHsK7",
        "autoForwardAddress": null,
        "network": "TESTNET",
        "assetType": "BTC",
        "isChangeAddress": false,
        "isContract": false,
        "chain": "BITCOIN",
        "assetId": "a2888c03-e412-4e30-aa22-dfd7eb23c6a6",
        "organizationId": "93d65302-f671-4ec6-9c55-f2b0af3bc874",
        "subAccountId": null,
        "used": false,
        "lastUsedAt": null,
        "createdAt": "2022-03-11T01:42:06.761Z"
    }
}

This endpoints allows you to get details of an address

HTTP Request

GET api/v1/addresses/{{addressId}}

Headers

Get Address Balance

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/addresses/0e5b13b7-8913-427b-bcae-85f0c6b73955/balance", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/addresses/0e5b13b7-8913-427b-bcae-85f0c6b73955/balance"

payload = ""

headers = {
   'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/addresses/0e5b13b7-8913-427b-bcae-85f0c6b73955/balance")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <encoded>"
request["Content-Type"] = "application/json"

response = http.request(request)
puts response.read_body

200 Response::

{
    "status": "success",
    "data": {
        "received": "27.83",
        "sent": "0.00",
        "balance": "27.83",
        "pending": "0.00",
        "blocked": "0.00"
    }
}

This endpoints allows you to get balance of an address

HTTP Request

GET api/v1/addresses/{{addressId}}/balance

Headers

Get Address Transactions

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var raw = ""

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/addresses/c51c5844-e7fa-4203-bb69-c5963f6e4dbb/transactions", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/addresses/c51c5844-e7fa-4203-bb69-c5963f6e4dbb/transactions"

payload = ""

headers = {
   'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/addresses/c51c5844-e7fa-4203-bb69-c5963f6e4dbb/transactions")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <encoded>"
request["Content-Type"] = "application/json"

response = http.request(request)
puts response.read_body

200 Response::

{
    "status": "success",
    "data": [
        {
            "uid": "ae866891-9629-4bbf-85c0-9753ebbf57c9",
            "guid": "e109d264-77d3-4a9e-93c9-df287c6a5ad1",
            "status": "PENDING",
            "type": "DEPOSIT",
            "hash": "00000000b7a97b9b783bafa7df0847d8473256509c5d7054a3d006e8640b59be",
            "confirmation": 0,
            "depositId": "a445054b-c3ea-42d2-8127-42c417b84c4a",
            "transferId": null,
            "address": "mzkmRQ92ocHhMEsdBnFsTd9sV7po9NeWfN",
            "transactionRef": "TRX-E8qVYTYAZm$16qaBcFL4qjgD7k9Su#",
            "fromAddress": null,
            "mode": "TEST",
            "description": null,
            "amount": "0.45",
            "dollarRate": "33715.32",
            "dollarAmount": "15171.894",
            "assetId":             "accountId": "326b47a1-da25-45e9-af9f-ae3e440ea7f4",
            "accountId": "326b47a1-da25-45e9-af9f-ae3e440ea7f4",
            "createdAt": "2021-06-23T21:17:08.761Z",
            "updatedAt": "2021-06-23T21:17:08.769Z",
            "completedAt": null,
            "cancelledAt": null
        }
    ]
}

This endpoints allows you to get all transactions of an address

HTTP Request

GET api/v1/addresses/{{addressId}}/transactions

Headers

Transactions

Transactions management endpoints

List Transactions

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var raw = "{\r\n    \r\n}";

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/transactions?accountId=ae866891-9629-4bbf-85c0-9753ebbf57c9", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://developers.bitpowr.com/api/v1/transactions"

payload = "{\r\n    \r\n}"
headers = {
   'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/transactions")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <encoded>"
request["Content-Type"] = "application/json"
request.body = "{\r\n    \r\n}"

response = http.request(request)
puts response.read_body

200 Response::

{
    "status": "success",
    "data": [
        {
            "uid": "ae866891-9629-4bbf-85c0-9753ebbf57c9",
            "status": "PENDING",
            "type": "DEPOSIT",
            "walletId": "ae866891-9629-4bbf-85c0-9753ebbf57c9",
            "depositId": "a445054b-c3ea-42d2-8127-42c417b84c4a",
            "transferId": null,
            "address": "mzkmRQ92ocHhMEsdBnFsTd9sV7po9NeWfN",
            "hash": "1b6dff5b430a8b0b4bc604a23dda5aa4d7979dd11dbc25d9345bd88889ad8297",
            "confirmation": 0,
            "transactionRef": "TRX-E8qVYTYAZm$16qaBcFL4qjgD7k9Su#",
            "description": null,
            "amount": "0.45",
            "dollarRate": "33715.32",
            "dollarAmount": "15171.894",
            "assetId": "7bc33e73-5fd8-4647-aaef-75ca793cc35d",
            "accountId": "326b47a1-da25-45e9-af9f-ae3e440ea7f4",
            "createdAt": "2021-06-23T21:17:08.761Z",
            "completedAt": null,
            "cancelledAt": null
        }
    ]
}

This endpoints allows you to get and filter transactions in your account by accountId,assetId, address, hash, asset.

HTTP Request

GET api/v1/transactions

Query Parameters

Parameter Default Description
accountId none retrieve transactions by accountId
assetId none retrieve transactions by asset uid
address none retrieve transactions by address
hash none retrieve transaction by hash
asset none retrieve transaction by asset type (BTC, ETH, USDT)

Get Transaction

var myHeaders = new Headers();

myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var raw = "{\r\n    \r\n}";

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/transactions/ae866891-9629-4bbf-85c0-9753ebbf57c9", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://developers.bitpowr.com/api/v1/transactions/ae866891-9629-4bbf-85c0-9753ebbf57c9"

payload = "{\r\n    \r\n}"
headers = {
  'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/transactions/ae866891-9629-4bbf-85c0-9753ebbf57c9")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <encoded>"
request["Content-Type"] = "application/json"
request.body = "{\r\n    \r\n}"

response = http.request(request)
puts response.read_body

200 Response::

{
    "status": "success",
    "data": {
        "uid": "ae866891-9629-4bbf-85c0-9753ebbf57c9",
        "status": "PENDING",
        "type": "DEPOSIT",
        "depositId": "a445054b-c3ea-42d2-8127-42c417b84c4a",
        "transferId": null,
        "address": "mzkmRQ92ocHhMEsdBnFsTd9sV7po9NeWfN",
        "hash": "1b6dff5b430a8b0b4bc604a23dda5aa4d7979dd11dbc25d9345bd88889ad8297",
        "confirmation": 0,
        "transactionRef": "TRX-E8qVYTYAZm$16qaBcFL4qjgD7k9Su#",
        "description": null,
        "amount": "0.45",
        "dollarRate": "33715.32",
        "dollarAmount": "15171.894",
        "assetId": "7bc33e73-5fd8-4647-aaef-75ca793cc35d",
        "accountId": "326b47a1-da25-45e9-af9f-ae3e440ea7f4",
        "createdAt": "2021-06-23T21:17:08.761Z",
        "completedAt": null,
        "cancelledAt": null
    }
}

This endpoints allows you retrieve transaction by id

HTTP Request

GET api/v1/transactions/{{id}}

URL Parameters

Parameter Default Description
id required transaction id

Create Transaction

var myHeaders = new Headers();

myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
    "walletId": "5f196e3s-480f-4c3b-bd13-6d014428da31",
    "assetType": "BTC",
    "address": "n2fQ5bqCTbez3U4oUftzivnRkJAQUGJCcE",
    "cryptoAmount": "0.00012741",
    "fee": "0.00003034"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://developers.bitpowr.com/api/v1/transactions", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/transactions"

payload = json.dumps({
    "walletId": "5f196e3s-480f-4c3b-bd13-6d014428da31",
    "assetType": "BTC",
    "address": "n2fQ5bqCTbez3U4oUftzivnRkJAQUGJCcE",
    "cryptoAmount": "0.00012741",
    "fee": "0.00003034"
})

headers = {
  'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/transactions")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <encoded>"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
    "walletId": "5f196e3s-480f-4c3b-bd13-6d014428da31",
    "assetType": "BTC",
    "address": "n2fQ5bqCTbez3U4oUftzivnRkJAQUGJCcE",
    "cryptoAmount": "0.00012741",
    "fee": "0.00003034"
})

response = http.request(request)
puts response.read_body

200 Response::

{
  "status": "success",
  "data": {
    "hash": "1b6dff5b430a8b0b4bc604a23dda5aa4d7979dd11dbc25d9345bd88889ad8297",
    "status": "PENDING",
    "amount": "0.00012741",
    "uid": "6680c116-c803-4e46-aa99-2f261cd216ac",
    "assetType": "BTC",
    "chain": "BITCOIN",
    "fee": "0.00003034",
    "ref": "BTP-Up5Ubzb0ot#H4LtW2VbdrxoxMt7Wy1"
  }
}

This endpoints allows you to create a transaction

HTTP Request

POST api/v1/transactions

Body Parameters

Parameter Default Description
wallletId required the uid of the account/wallet you want to create transaction for.
assetType required the asset you want to add (BTC,USDT,LTC,BCH)
address required the receiving address.
cryptoAmount required amount of asset to be sent
fee optional transaction fee
estimatedFee optional fee estimate of the transaction
fromAddress optional address from which amount will be sent from
gasLimit optional(for ETH,POLYGON and BSC)
gasPrice optional(for ETH, POLYGON and BSC)
description optional details of the transaction
memo optional memo string for chains like Stellar, Bantu
operation optional custom operation for chains like Stellar, Bantu. Default is payment for existing account and create_account for new account. We also support add_trust for adding trustline.
queued optional (true by default) Submit transactions to the transaction relayer (A queue system). To submit directly to the blockchain, should be false. Hash only comes with the response when its submitted directly.
changeAddressType legacy segwit, wrappedsegwit, legacy

Estimates

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  assetId: "1816-7e6a-49e5-b18d-d2e5d90c25f2",
  chain: "ETHEREUM",
  token: "USDT",
  from: ["0x4f14c3605946651542d7f0161199b397b76a3cd3"],
  tos: [
    {
      address: "0xF845f557b16F2399b9807129f40773F5c804fcf8",
      value: "0.00231952",
    },
  ],
});

var requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: raw,
  redirect: "follow",
};

fetch(
  "https://developers.bitpowr.com/api/v1/transactions/estimate",
  requestOptions
)
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/transactions/estimate"

payload = json.dumps({
   "assetId": "1816-7e6a-49e5-b18d-d2e5d90c25f2",
    "chain": "ETHEREUM",
    "token": "USDT",
    "from": ["0x4f14c3605946651542d7f0161199b397b76a3cd3"],
    "tos": [{"address":"0xF845f557b16F2399b9807129f40773F5c804fcf8", "value":"0.00231952"}]
})
headers = {
'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
require "uri"
require "json"
require "net/http"

url = URI("https://developers.bitpowr.com/api/v1/transactions/estimate")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"]= "Bearer <encoded>"
request.body = JSON.dump({
    "assetId": "1816-7e6a-49e5-b18d-d2e5d90c25f2",
    "chain": "ETHEREUM",
    "token": "USDT",
    "from": ["0x4f14c3605946651542d7f0161199b397b76a3cd3"],
    "tos": [{"address":"0xF845f557b16F2399b9807129f40773F5c804fcf8", "value":"0.00231952"}]
})

response = http.request(request)
puts response.read_body

200 Response:

{
  "status": "success",
  "fee": {
    "gasLimit": 21000,
    "gasPrice": 46.373333333
  }
}

This endpoint allows you to get transaction estimates

HTTP Request

POST api/v1/transactions/estimate

Body Parameters

Parameter Default Description
accountId optional the uid of the account you are trying to estimate transaction from
assetId optional the uid of the asset you are trying to estimate transaction from
chain required the chain you want to estimate (BITCOIN,BITCOINCASH, LITECOIN, POLYGON, BSC, ETHEREUM)
token string the crypto token you want to estimate (USDC, USDT, USDC_MATIC, USDT_MATIC, USDC_BSC)
from optional the crypto address you're sending from
tos required the crypto address you're sending to and the value

Note: Either of accountId and assetId are required. You cant leave both empty. You need to pass either of them. If from is not given, the system will select the first address that has enough funds for the total sum of the tos amount

Webhook

Here, you can find a description of all the objects expected and to be received by the webhook url provided in the wallet app. Head over to the webhook settings in the dashboard to setup your webhook url and secrets.

Webhook Object

Parameter Type Description
status string transaction status
confirmation number transaction confirmation count
type string transaction type ("TRANSFER", "DEPOSIT")
address string receiving address
senderAddress string the senders address
hash string transacction hash
amount integer/float amount in USD
curency string fiat currency type
cryptoAmount integer/float amount in crypto
cryptoType string crypto type
depositId string deposit uid
accountId string account ui

Webhook Secret

The webhook secret is a way for you to verify if the webhook request is coming from Bitpowr. The webhook secret is appended to the header as x-webhook-secret when making requests to the webhook url. The webhook secret is masked and Base 64 encoded. You will need to decode it and compare to verify.

Markets

Market Prices

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");


fetch(
  "https://developers.bitpowr.com/api/v1/market/price?currency=USD",
)
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/market/price?currency=USD"


headers = {
'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers)

print(response.text)

200 Response:

{
  "coin":"price"
}

This endpoint allows you to get the market estimates

HTTP Request

GET api/v1/market/price

Query Parameters

Parameter Default Description
currency USD the currency pair to query (USD, NGN)

Market Ticker

var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <encoded>");
myHeaders.append("Content-Type", "application/json");


fetch(
  "https://developers.bitpowr.com/api/v1/market/ticker",
)
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
import requests
import json

url = "https://developers.bitpowr.com/api/v1/market/ticker"


headers = {
'Authorization': 'Bearer <encoded>',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers)

print(response.text)

200 Response:

{
  "coin/pair":"0.012"
}

This endpoint allows you to get the market estimates

HTTP Request

GET api/v1/market/ticker

Utils

Generate Auth Token

200 Response:

{
  "token": "eyDmaV#eNni8PGFAHcqJNOcdM1bCAjYAc6Q8JDdeM$EPI9$n0q..................."
}

This endpoint allows you to generate Auth Token from public_key and secret_key

HTTP Request

POST api/utils/generateToken

Query/Body Parameters

Parameter Default Description
public_key Null public_key
secret_key Null secret_key

Validate Address

200 Response:

{
  "status": "success",
  "message": ""
}

This endpoint allows you to validate address on a particular chain and network

HTTP Request

POST api/utils/validate-address

Body Parameters

Parameter Default Description
network Null either TESTNET or MAINNET
address Null address
asset Null valid asset on bitpowr platform

Data Objects

Here, you can find a description of all the objects expected and returned by the endpoints described above.

Account

Parameter Type Description
uid string ID of the account.
name string name of account
type string account type - account/wallet
fiatBalance Object fiat balance of an account
currency Object fiat currency of an account
isArchived boolean if account is archived
showInDashboard boolean to show in dashboard
walletAssetType string type of accounts assets - multiassets
network string account environment - MAINNET, TESTNET
maxDailyAmount string max daily amount of transactions
maxMonthlyAmount string max monthly amount of transactions
maxMonthlyTransactionsCount number max number of monthly outgoing transactions
maxDailyTransactionsCount number max number of daily outgoing transactions
assets array list of assets in an account

Assets

Parameter Type Description
uid string ID of the asset.
label string asset name
isDeleted boolean if account has been deleted
isArchived boolean if account is archived
organizationId string ID of the organization
accountId string ID of the account.
assetType string type of assets.
source string source
network string account environment - MAINNET, TESTNET
enableAutoForwarding boolean if transactions should be forwarded
autoForwardAddress string address to forward transactions to
createdAt datetime date and time asset was created
balance object contains sent, received, current balance of the asset

Addresses

Parameter Type Description
uid string ID of the address.
address string the crypto address
addressRef boolean reference of the crypto address
accountId string ID of the account.
assetType string type of assets.
network string account environment - MAINNET, TESTNET
lastUsedAt datetime date and time the address was last used
createdAt datetime date and time address was created

Transactions

Parameter Type Description
uid string ID of the transaction.
status string status/state of the transaction
type string can either be 'DEPOSIT' or 'TRANSFER'
depositId string ID of the deposit
transferId string ID of the transfer
hash string transaction hash
confirmation number number of times the transaction has been confirmed.
transactionRef string reference number of the transaction
description string details of the transaction
amount number transaction crypto amount.
dollarRate number current exchange rate when the transaction was made.
dollarAmount number transaction fiat amount.
assetId string ID of the asset.
accountId string ID of the account.
createdAt datetime date and time transaction was created
updatedAt datetime date and time transaction was updated
completedAt datetime date and time transaction was completed
cancelledAt datetime date and time transaction was cancelled

Balances

Parameter Type Description
sent decimal amount sent from account.
received decimal amount received to account
balance decimal current account balance
pending decimal pending amount to be received
blocked decimal pending amount to be sent out.

Errors

The Bitpowr Dev API uses the following error codes:

Error Code Meaning
400 Bad Request -- The request could not be understood by the server due to malformed syntax.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The endpoint requested is hidden for administrators only.
404 Not Found -- The specified endpoint could not be found.
405 Method Not Allowed -- You tried to access a endpoint with an invalid method.
406 Not Acceptable -- You requested a format that isn't JSON.
410 Gone -- The endpoint requested has been removed from our servers.
418 I'm a teapot.
429 Too Many Requests -- You're requesting too many endpoints! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.