Banxa powers the largest digital asset platforms by providing payments infrastructure and regulatory compliance across global markets. Our mission and vision is to build the bridge that provides people in every part of the world access to a fairer and more equitable financial system. Visit the Banxa documentation to find out more.

API Host

EnvironmentAPI Host



NodeJS Examples

Generate HMAC Token

const generateHmac = (signature: string, nonce: number): string => {
  const crypto = require("crypto");
  const key = "YOUR_BANXA_KEY";
  const secret = "YOUR_BANXA_SECRET_TOKEN";

  const localSignature = crypto
    .createHmac("SHA256", secret)
  return `${key}:${localSignature}:${nonce}`;

To get started using the Banxa APIs, please get in touch here with the Banxa team in order to get a user key and secret token.

Send Request

const sendGetRequest = (query: string): void => {
  const hostname = "";
  const nonce =;
  const method = "GET";
  let data = method + "\n" + query + "\n" + nonce;

  const hmac = generateHmac(data, nonce);
  const https = require("https");
  const options = {
    hostname: hostname,
    path: query,
    method: method,
    headers: {
      "Content-Type": "application/json",
      Authorization: `Bearer ${hmac}`,

  const req = https.get(
    (res: {
      statusCode: string;
      headers: string;
      setEncoding: (arg0: string) => void;
      on: (arg0: string, arg1: { (chunk: string): void }) => void;
    }) => {
      console.log(`STATUS: ${res.statusCode}`);
      console.log(`HEADERS: ${JSON.stringify(res.headers)}`);
      res.on("data", (chunk: string) => {
        console.log(`BODY: ${chunk}`);
      res.on("end", () => {
        console.log("No more data in response.");

  req.on("error", (e: { message: string }) => {
    console.error(`problem with request: ${e.message}`);


Here are additional resources to help you get started with Banxa:

Last updated