LEDGIBLE DATA API V3 (3.0)

Download OpenAPI specification:

Welcome

Welcome to Ledgible's data api, you can find here all the documentation relative to version 3.

Authentication

It is expected that you have provided a valid RSA public key from which we can verify your token signatures. Public keys must be PEM encoded and have a modulus of at least 2048 bits; weaker keys are rejected. If you haven't been given your assigned user ID, please contact support. If everything is in order, you may start by creating a new account if you haven't already and start associating new wallets and exchanges.

# generate a key pair to sign your requests with
openssl genrsa -out private.pem 2048
openssl rsa -in private.pem -pubout -out public.pem

Sign every request at the moment you send it. The timestamp you sign is checked against our clock and must be within 5 minutes of it, so a bearer token cannot be cached and reused; generate a new one for every request.

const jwt = require('jsonwebtoken');
const crypto = require('crypto');

function generateBearerToken({ keyId, method, path, privateKey, projectId, userId }) {
  // get number of milliseconds since the epoch 
  const timestamp = new Date().getTime();

  return jwt.sign({
    keyId,
    message: crypto.sign(
      null, 
      Buffer.from(timestamp + '|' + userId + '|' + method.toUpperCase() + ' ' + path), 
      privateKey
    ),
    projectId,
    timestamp,
    userId,
  }, JWT_SECRET);
}

// Example token to retrieve accounts
const token = generateBearerToken({
  keyId: YOUR_PROJECT_KEY_ID, 
  method: 'get', 
  path: '/api/v3/accounts', 
  privateKey: YOUR_PRIVATE_KEY, 
  projectId: YOUR_PROJECT_ID, 
  userId: YOUR_USER_ID,
});

Webhook Signing

Webhooks are used to notify your application of events that happen in your Ledgible account. To ensure that the webhook request originated from Ledgible and was not tampered with, we sign the webhook payload with your webhook signing secret and include the signature in the X-Verady-Signature-256 header.

Every new webhook is created with a signing secret, which is returned exactly once. Webhooks created before signing secrets were introduced have none and are delivered unsigned until you rotate the secret. The hasSigningSecret flag on a webhook tells you which is the case.

Here's how you can verify the signature on your end:

const crypto = require('crypto');

function verifyWebhookSignature({ payload, receivedSignatureHeader, secret }) {
  if (!receivedSignatureHeader || !receivedSignatureHeader.startsWith('sha256=')) {
    // Signature header is missing or not in the expected format
    return false;
  }

  const expectedSignature = receivedSignatureHeader.split('=')[1];
  const payloadString = JSON.stringify(payload);
  const calculatedSignature = crypto
    .createHmac('sha256', secret)
    .update(payloadString)
    .digest('hex');

  // Use crypto.timingSafeEqual to prevent timing attacks
  try {
    return crypto.timingSafeEqual(Buffer.from(calculatedSignature, 'hex'), 
                              Buffer.from(expectedSignature, 'hex'));
  } catch (error) {
    // Handle cases where signature buffers might have different lengths
    return false;
  }
}

// Example usage:
const isValid = verifyWebhookSignature({
  payload: request.body, // The raw request body (JSON object)
  receivedSignatureHeader: request.headers['x-verady-signature-256'],
  secret: YOUR_WEBHOOK_SIGNING_SECRET,
});

Replace YOUR_WEBHOOK_SIGNING_SECRET with the secret returned to you when the webhook was created or its signing secret was last rotated.

Accounts

Retrieves all accounts

Retrieves all accounts associated with the authenticated user

Authorizations:
http_bearer

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create a new account

Creates a new account associated with the user

Authorizations:
http_bearer
Request Body schema: application/json
required
name
required
string

The name of the account

timezone
required
string

A valid IANA timezone

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "timezone": "America/New_York"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Retrieves an account

Retrieves an account associated with the authenticated user

Authorizations:
http_bearer
path Parameters
accountId
required
string

The account id

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete account

Allows deleting an account

Authorizations:
http_bearer
path Parameters
accountId
required
string

The account id

Responses

Response samples

Content type
application/json
{
  • "errorCode": 400,
  • "status": "invalidBodyParameters",
  • "statusMessage": "id required"
}

Retrieves account balances

Retrieves account balances with the authenticated user

Authorizations:
http_bearer
path Parameters
accountId
required
string

The account id

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Retrieves the account exchanges

Retrieves the account exchanges associated with the authenticated user

Authorizations:
http_bearer
path Parameters
accountId
required
string

The account id

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieves information about gain/loss for a current tax year

Retrieves information about gain/loss for a current tax year, may require sync tax trigger

Authorizations:
http_bearer
path Parameters
accountId
required
string

The account id

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Retrieves tax transactions related to an account

Retrieves the paginated transaction related to an account

Authorizations:
http_bearer
path Parameters
accountId
required
string

The account id

query Parameters
currency
string

The 3 character currency code

exchangeId
string

The exchange id

isFullyReconciled
string

Whether to filter by fully reconciled transactions boolean string

pageNumber
integer

The page number

pageSize
integer

The number of transactions per page

sort
integer
Enum: -1 1

The sort order (1 for ascending, -1 for descending)

txSide
string
Enum: "fee" "incoming" "outgoing"

The side of the transaction

walletId
string

The wallet id

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pageNumber": 0,
  • "pageSize": 5,
  • "sort": 1,
  • "total": 1
}

Retrieves the account wallets

Retrieves the account wallets associated with the authenticated user

Authorizations:
http_bearer
path Parameters
accountId
required
string

The account id

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Update tax reconciliations with spec id

Allows partial bulk update of tax transactions reconciliations with spec id, objects with undefined amount will remove spec id reconciliation

Authorizations:
http_bearer
path Parameters
id
required
string

The account id

Request Body schema: application/json
required
required
Array of objects

the tax transaction id list

Responses

Request samples

Content type
application/json
{
  • "taxTransactions": [
    ]
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Update tax transactions

Allows partial bulk update of tax category for tax transactions

Authorizations:
http_bearer
path Parameters
id
required
string

The account id

Request Body schema: application/json
required
category
required
string

The category to assign (see tax categories endpoint)

ids
required
Array of strings

the tax transaction id list

Responses

Request samples

Content type
application/json
{
  • "category": "string",
  • "ids": [
    ]
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Update tax transaction

Allows single transaction update, updating cost basis will update the entire lot

Authorizations:
http_bearer
path Parameters
id
required
string

The account id

taxTransactionId
required
string

The tax transaction id

Request Body schema: application/json
required
price
required
string

The price to assign as cost basis

Responses

Request samples

Content type
application/json
{
  • "price": "string"
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Request external sources synchronization

On demand trigger of external sources synchronization

Authorizations:
http_bearer
path Parameters
accountId
required
string

The account id

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Request tax calculator run

On demand trigger of tax calculator on account

Authorizations:
http_bearer
path Parameters
accountId
required
string

The account id

Responses

Response samples

Content type
application/json
{
  • "error": "invalid_token",
  • "errorCode": 401,
  • "error_description": "Invalid token: access token is invalid",
  • "status": "unauthorized",
  • "statusMessage": "Unauthorized"
}

Authorization

Currency

Retrieves requested currencies

Retrieves currency information for requested provider and symbols

Authorizations:
http_bearer
query Parameters
providerName
string
Enum: "binance" "binanceus" "bitfinex" "bitmex" "bitstamp" "bittrex" "blockchain" "coinbase" "coinbaseprime" "coinbasepro" "crypto" "ftx" "ftxus" "gemini" "hitbtc" "huobi" "internal" "kraken" "kucoin" "lbank" "okcoin" "okex" "okx" "paxos" "poloniex" "sfox" "uphold"

The name of the provider

symbols
Array of strings
Example: symbols=BTC,ETH,USDT

The list of requested symbols

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Exchanges

Retrieves the account exchanges

Retrieves the account exchanges associated with the authenticated user

Authorizations:
http_bearer
path Parameters
accountId
required
string

The account id

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Request external sources synchronization

On demand trigger of external sources synchronization

Authorizations:
http_bearer
path Parameters
accountId
required
string

The account id

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Retrieves the available exchanges based on auth

Retrieves the available exchanges based on auth

Authorizations:
http_bearer
query Parameters
excludeLinks
boolean

Include links in exchange instructions

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieves an exchange

Retrieves an exchange associated with the authenticated user

Authorizations:
http_bearer
path Parameters
exchangeId
required
string

The exchange id

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update exchange

Allows updating an exchange

Authorizations:
http_bearer
path Parameters
exchangeId
required
string

The exchange id

Request Body schema: application/json
required
name
string

The exchange name

object

The secrets object, can be empty json for manual

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "secrets": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete exchange

Allows deleting a exchange

Authorizations:
http_bearer
path Parameters
exchangeId
required
string

The exchange id

Responses

Response samples

Content type
application/json
{
  • "errorCode": 400,
  • "status": "invalidBodyParameters",
  • "statusMessage": "id required"
}

Retrieves exchange balances

Retrieves exchange balances associated with the authenticated user

Authorizations:
http_bearer
path Parameters
exchangeId
required
string

The exchange id

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get paginated exchange orders

Retrieves paginated exchange orders. You can filter by either a single currency (using the currency parameter) or by specific currency types (using feeCurrency, fromCurrency, priceCurrency, toCurrency)

Authorizations:
http_bearer
path Parameters
exchangeId
required
string

The exchange id

query Parameters
currency
string

Filter by any currency (from, to, fee, or price)

feeCurrency
string

Filter by fee currency

fromCurrency
string

Filter by from currency

priceCurrency
string

Filter by price currency

pageNumber
integer

The page number

pageSize
integer

The number of transactions per page

sort
integer
Enum: -1 1

The sort order (1 for ascending, -1 for descending)

toCurrency
string

Filter by to currency

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "lastUpdated": "2019-08-24T14:15:22Z",
  • "pageNumber": 0,
  • "pageSize": 5,
  • "sort": 1,
  • "total": 1
}

Create manual exchange orders

Allows adding orders to type manual exchanges

Authorizations:
http_bearer
path Parameters
exchangeId
required
string

The exchange id

Request Body schema: application/json
required
Array
date
required
string <date-time>
fee
required
string
feeCurrency
required
string
fromAmount
required
string
fromSymbol
required
string
id
required
string
price
required
string
priceCurrency
required
string
source
required
string
toAmount
required
string
toSymbol
required
string
type
required
string
Enum: "buy" "crypto-crypto" "deposit" "sell" "withdrawal"

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pageNumber": 0,
  • "pageSize": 5,
  • "sort": 1,
  • "total": 1
}

Delete manual exchange orders

Allows deleting multiple manual exchange orders

Authorizations:
http_bearer
path Parameters
exchangeId
required
string

The exchange id

Request Body schema: application/json
required
Array
id
string

The id of the transaction

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "errorCode": 400,
  • "status": "invalidBodyParameters",
  • "statusMessage": "id required"
}

Create a new exchange

Creates a new exchange associated with the user

Authorizations:
http_bearer
Request Body schema: application/json
required
accountId
required
string

The account id to be associated with this wallet

exchangeName
required
string
Enum: "binance" "binanceus" "bitfinex" "bitmex" "bitstamp" "blockchain" "coinbase" "coinbaseexchange" "coinbasepro" "coinbaseprime" "crypto" "gemini" "hitbtc" "huobi" "kraken" "lbank" "okcoin" "okx" "poloniex" "sfox" "paxos"

The name of the exchange

exchangeType
string
Enum: "manual" "norm"

The type of the exchange, norm exchanges will have their orders pulled via api if valid secrets

nickname
string

The nickname of the exchange

oauthCode
string

The oauth code received from the oauth callback process

object

The secrets object, can be empty json for manual

state
string

The state string received from the oauth callback process

Responses

Request samples

Content type
application/json
{
  • "accountId": "string",
  • "exchangeName": "binance",
  • "exchangeType": "manual",
  • "nickname": "string",
  • "oauthCode": "string",
  • "secrets": {
    },
  • "state": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Create manual exchange orders with file upload

Allows adding orders to type manual exchanges via csv file

Authorizations:
http_bearer
path Parameters
exchangeId
required
string

The exchange id

Request Body schema: multipart/form-data
required
file
string <binary>

The csv file to upload

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pageNumber": 0,
  • "pageSize": 5,
  • "sort": 1,
  • "total": 1
}

Request exchange source synchronization

On demand trigger of exchange source synchronization

Authorizations:
http_bearer
path Parameters
exchangeId
required
string

The exchange id

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Orders

Get paginated exchange orders

Retrieves paginated exchange orders. You can filter by either a single currency (using the currency parameter) or by specific currency types (using feeCurrency, fromCurrency, priceCurrency, toCurrency)

Authorizations:
http_bearer
path Parameters
exchangeId
required
string

The exchange id

query Parameters
currency
string

Filter by any currency (from, to, fee, or price)

feeCurrency
string

Filter by fee currency

fromCurrency
string

Filter by from currency

priceCurrency
string

Filter by price currency

pageNumber
integer

The page number

pageSize
integer

The number of transactions per page

sort
integer
Enum: -1 1

The sort order (1 for ascending, -1 for descending)

toCurrency
string

Filter by to currency

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "lastUpdated": "2019-08-24T14:15:22Z",
  • "pageNumber": 0,
  • "pageSize": 5,
  • "sort": 1,
  • "total": 1
}

Create manual exchange orders

Allows adding orders to type manual exchanges

Authorizations:
http_bearer
path Parameters
exchangeId
required
string

The exchange id

Request Body schema: application/json
required
Array
date
required
string <date-time>
fee
required
string
feeCurrency
required
string
fromAmount
required
string
fromSymbol
required
string
id
required
string
price
required
string
priceCurrency
required
string
source
required
string
toAmount
required
string
toSymbol
required
string
type
required
string
Enum: "buy" "crypto-crypto" "deposit" "sell" "withdrawal"

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pageNumber": 0,
  • "pageSize": 5,
  • "sort": 1,
  • "total": 1
}

Delete manual exchange orders

Allows deleting multiple manual exchange orders

Authorizations:
http_bearer
path Parameters
exchangeId
required
string

The exchange id

Request Body schema: application/json
required
Array
id
string

The id of the transaction

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "errorCode": 400,
  • "status": "invalidBodyParameters",
  • "statusMessage": "id required"
}

Create manual exchange orders with file upload

Allows adding orders to type manual exchanges via csv file

Authorizations:
http_bearer
path Parameters
exchangeId
required
string

The exchange id

Request Body schema: multipart/form-data
required
file
string <binary>

The csv file to upload

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pageNumber": 0,
  • "pageSize": 5,
  • "sort": 1,
  • "total": 1
}

Get a single order

Retrieves a single order

Authorizations:
http_bearer
path Parameters
orderId
required
string

The id of the order

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Projects

Retrieves a project

Retrieves a project associated with the authenticated user

Authorizations:
http_bearer

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Retrieves project users

Retrieves all project users

Authorizations:
http_bearer

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create a project user

Add a new user to the project

Authorizations:
http_bearer
Request Body schema: application/json
required
email
required
string

The user email to add to the project

Responses

Request samples

Content type
application/json
{
  • "email": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Replace project owner

Assign another user as project owner

Authorizations:
http_bearer
path Parameters
userId
required
string

The user id

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get project keys

Retrieves all RSA keys for the project

Authorizations:
http_bearer

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create a project key

Add a new RSA key to the project

Authorizations:
http_bearer
Request Body schema: application/json
required
name
required
string

The name for the RSA key

publicKey
string

The PEM encoded RSA public key, minimum 2048-bit modulus (optional, generates new key if not provided)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "publicKey": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update project key

Update RSA key properties

Authorizations:
http_bearer
path Parameters
keyId
required
string
Request Body schema: application/json
required
name
string

The name for the RSA key

active
boolean

Whether the key is active

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "active": true
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete project key

Delete an RSA key from the project

Authorizations:
http_bearer
path Parameters
keyId
required
string

Responses

Response samples

Content type
application/json
{
  • "error": "invalid_token",
  • "errorCode": 401,
  • "error_description": "Invalid token: access token is invalid",
  • "status": "unauthorized",
  • "statusMessage": "Unauthorized"
}

Update project

Allows updating project name and active flag

Authorizations:
http_bearer
Request Body schema: application/json
required
active
boolean

Activate or deactivate the project

name
string

The project name

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "type": null
}

Delete project user

Allows deleting a project user

Authorizations:
http_bearer
path Parameters
projectUserId
required
string

The project user id

Responses

Response samples

Content type
application/json
{
  • "errorCode": 400,
  • "status": "invalidBodyParameters",
  • "statusMessage": "id required"
}

Tax

Retrieves tax transactions related to an account

Retrieves the paginated transaction related to an account

Authorizations:
http_bearer
path Parameters
accountId
required
string

The account id

query Parameters
currency
string

The 3 character currency code

exchangeId
string

The exchange id

isFullyReconciled
string

Whether to filter by fully reconciled transactions boolean string

pageNumber
integer

The page number

pageSize
integer

The number of transactions per page

sort
integer
Enum: -1 1

The sort order (1 for ascending, -1 for descending)

txSide
string
Enum: "fee" "incoming" "outgoing"

The side of the transaction

walletId
string

The wallet id

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pageNumber": 0,
  • "pageSize": 5,
  • "sort": 1,
  • "total": 1
}

Update tax reconciliations with spec id

Allows partial bulk update of tax transactions reconciliations with spec id, objects with undefined amount will remove spec id reconciliation

Authorizations:
http_bearer
path Parameters
id
required
string

The account id

Request Body schema: application/json
required
required
Array of objects

the tax transaction id list

Responses

Request samples

Content type
application/json
{
  • "taxTransactions": [
    ]
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Update tax transactions

Allows partial bulk update of tax category for tax transactions

Authorizations:
http_bearer
path Parameters
id
required
string

The account id

Request Body schema: application/json
required
category
required
string

The category to assign (see tax categories endpoint)

ids
required
Array of strings

the tax transaction id list

Responses

Request samples

Content type
application/json
{
  • "category": "string",
  • "ids": [
    ]
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Update tax transaction

Allows single transaction update, updating cost basis will update the entire lot

Authorizations:
http_bearer
path Parameters
id
required
string

The account id

taxTransactionId
required
string

The tax transaction id

Request Body schema: application/json
required
price
required
string

The price to assign as cost basis

Responses

Request samples

Content type
application/json
{
  • "price": "string"
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Request tax calculator run

On demand trigger of tax calculator on account

Authorizations:
http_bearer
path Parameters
accountId
required
string

The account id

Responses

Response samples

Content type
application/json
{
  • "error": "invalid_token",
  • "errorCode": 401,
  • "error_description": "Invalid token: access token is invalid",
  • "status": "unauthorized",
  • "statusMessage": "Unauthorized"
}

Get all tax categories

Retrieves all configurable tax categories

Authorizations:
http_bearer

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Transactions

Get paginated transaction events

Retrieves the paginated transaction events

Authorizations:
http_bearer
path Parameters
transactionHash
required
string

The transaction hash

query Parameters
pageNumber
integer

The page number

pageSize
integer

The number of transactions per page

sort
integer
Enum: -1 1

The sort order (1 for ascending, -1 for descending)

taxCategory
string
Enum: "acquisition_standard" "airdrop_standard" "buy_standard" "orderIgnore_standard" "collateralLiquidation_standard" "collateralRetrieval_standard" "collateralRetrievalNonTaxable_standard" "collateralize_standard" "collateralizeNonTaxable_standard" "acquisition_defi" "collateralLiquidation_defi" "collateralRetrieval_defi" "collateralRetrievalNonTaxable_defi" "collateralize_defi" "collateralizeNonTaxable_defi" "donation_defi" "gift_defi" "interestIncome_defi" "interestPayment_defi" "internalTransaction_defi" "liquidityBalancingAcquisition_defi" "liquidityBalancingDisposal_defi" "liquidityFarmDeposit_defi" "liquidityFarmWithdrawal_defi" "liquidityPoolDeposit_defi" "liquidityPoolWithdrawal_defi" "liquidityRewards_defi" "liquidityTokenMovement_defi" "loanPayment_defi" "stakingDeposit_defi" "stakingRewards_defi" "stakingWithdrawal_defi" "swap_defi" "withdrawal_defi" "workIncome_defi" "loanDisbursement_defi" "donation_standard" "derivativesFee_standard" "earnRewards_standard" "fee_standard" "forkIncome_standard" "gift_standard" "interestIncome_standard" "interestPayment_standard" "loanDisbursement_standard" "loanPayment_standard" "miningIncome_standard" "nonTaxableEvent_standard" "withdrawal_retail_standard" "sell_standard" "stakingConversion_standard" "stakingConversionNonTaxable_standard" "stakingDeposit_standard" "stakingRewards_standard" "stakingWithdrawal_standard" "transfer_standard" "withdrawal_standard" "workIncome_standard" "open_derivatives" "increase_derivatives" "decrease_derivatives" "close_derivatives" "reverse_derivatives" "funding_realisation_derivatives" "flex_conversion_derivatives"

The tax category to filter by

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pageNumber": 0,
  • "pageSize": 5,
  • "sort": 1,
  • "total": 1
}

Get paginated wallet transactions

Retrieves paginated wallet transactions, embedded transferIns and transferOuts limited to 50, for more transaction events please use the /transactions/{hash}/events endpoint.

Authorizations:
http_bearer
path Parameters
walletId
required
string

The wallet id

query Parameters
pageNumber
integer

The page number

pageSize
integer

The number of transactions per page

sort
integer
Enum: -1 1

The sort order (1 for ascending, -1 for descending)

taxCategory
string
Enum: "acquisition_standard" "airdrop_standard" "buy_standard" "orderIgnore_standard" "collateralLiquidation_standard" "collateralRetrieval_standard" "collateralRetrievalNonTaxable_standard" "collateralize_standard" "collateralizeNonTaxable_standard" "acquisition_defi" "collateralLiquidation_defi" "collateralRetrieval_defi" "collateralRetrievalNonTaxable_defi" "collateralize_defi" "collateralizeNonTaxable_defi" "donation_defi" "gift_defi" "interestIncome_defi" "interestPayment_defi" "internalTransaction_defi" "liquidityBalancingAcquisition_defi" "liquidityBalancingDisposal_defi" "liquidityFarmDeposit_defi" "liquidityFarmWithdrawal_defi" "liquidityPoolDeposit_defi" "liquidityPoolWithdrawal_defi" "liquidityRewards_defi" "liquidityTokenMovement_defi" "loanPayment_defi" "stakingDeposit_defi" "stakingRewards_defi" "stakingWithdrawal_defi" "swap_defi" "withdrawal_defi" "workIncome_defi" "loanDisbursement_defi" "donation_standard" "derivativesFee_standard" "earnRewards_standard" "fee_standard" "forkIncome_standard" "gift_standard" "interestIncome_standard" "interestPayment_standard" "loanDisbursement_standard" "loanPayment_standard" "miningIncome_standard" "nonTaxableEvent_standard" "withdrawal_retail_standard" "sell_standard" "stakingConversion_standard" "stakingConversionNonTaxable_standard" "stakingDeposit_standard" "stakingRewards_standard" "stakingWithdrawal_standard" "transfer_standard" "withdrawal_standard" "workIncome_standard" "open_derivatives" "increase_derivatives" "decrease_derivatives" "close_derivatives" "reverse_derivatives" "funding_realisation_derivatives" "flex_conversion_derivatives"

The tax category to filter by

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pageNumber": 0,
  • "pageSize": 5,
  • "sort": 1,
  • "total": 1
}

Create manual wallet transactions

Allows adding transactions to type manual wallets

Authorizations:
http_bearer
path Parameters
walletId
required
string

The wallet id

Request Body schema: application/json
required

A JSON object containing manual transaction information

Array of objects (manualWalletTransactionDefi)
Array of objects (manualWalletTransactionRegular)

Responses

Request samples

Content type
application/json
{
  • "defi": [
    ],
  • "regular": [
    ]
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pageNumber": 0,
  • "pageSize": 5,
  • "sort": 1,
  • "total": 1
}

Delete manual wallet transactions

Allows deleting multiple manual wallet transactions

Authorizations:
http_bearer
path Parameters
walletId
required
string

The wallet id

Request Body schema: application/json
required
Array
id
string

The id of the transaction

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "errorCode": 400,
  • "status": "invalidBodyParameters",
  • "statusMessage": "id required"
}

Create manual wallet transactions with file upload

Allows adding transactions to type manual wallets via csv file

Authorizations:
http_bearer
path Parameters
walletId
required
string

The wallet id

Request Body schema: multipart/form-data
required
file
string <binary>

The csv file to upload

type
string

Type of transactions

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pageNumber": 0,
  • "pageSize": 5,
  • "sort": 1,
  • "total": 1
}

Wallets

Retrieves the account wallets

Retrieves the account wallets associated with the authenticated user

Authorizations:
http_bearer
path Parameters
accountId
required
string

The account id

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Request external sources synchronization

On demand trigger of external sources synchronization

Authorizations:
http_bearer
path Parameters
accountId
required
string

The account id

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Retrieves a wallet

Retrieves a wallet associated with the authenticated user

Authorizations:
http_bearer
path Parameters
walletId
required
string

The wallet id

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update wallet

Allows updating a wallet

Authorizations:
http_bearer
path Parameters
walletId
required
string

The wallet id

Request Body schema: application/json
required
addresses
Array of strings

An array of addresses to add to this wallet

name
string

The wallet name

Responses

Request samples

Content type
application/json
{
  • "addresses": [
    ],
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete wallet

Allows deleting a wallet

Authorizations:
http_bearer
path Parameters
walletId
required
string

The wallet id

Responses

Response samples

Content type
application/json
{
  • "errorCode": 400,
  • "status": "invalidBodyParameters",
  • "statusMessage": "id required"
}

Retrieves wallet addresses

Retrieves paginated addresses from a given wallet

Authorizations:
http_bearer
path Parameters
walletId
required
string

The wallet id

query Parameters
pageNumber
integer

The page number

pageSize
integer

The number of transactions per page

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pageNumber": 0,
  • "pageSize": 5,
  • "sort": 1,
  • "total": 1
}

Retrieves wallet balances

Retrieves wallets associated with the authenticated user

Authorizations:
http_bearer
path Parameters
walletId
required
string

The wallet id

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get paginated wallet transactions

Retrieves paginated wallet transactions, embedded transferIns and transferOuts limited to 50, for more transaction events please use the /transactions/{hash}/events endpoint.

Authorizations:
http_bearer
path Parameters
walletId
required
string

The wallet id

query Parameters
pageNumber
integer

The page number

pageSize
integer

The number of transactions per page

sort
integer
Enum: -1 1

The sort order (1 for ascending, -1 for descending)

taxCategory
string
Enum: "acquisition_standard" "airdrop_standard" "buy_standard" "orderIgnore_standard" "collateralLiquidation_standard" "collateralRetrieval_standard" "collateralRetrievalNonTaxable_standard" "collateralize_standard" "collateralizeNonTaxable_standard" "acquisition_defi" "collateralLiquidation_defi" "collateralRetrieval_defi" "collateralRetrievalNonTaxable_defi" "collateralize_defi" "collateralizeNonTaxable_defi" "donation_defi" "gift_defi" "interestIncome_defi" "interestPayment_defi" "internalTransaction_defi" "liquidityBalancingAcquisition_defi" "liquidityBalancingDisposal_defi" "liquidityFarmDeposit_defi" "liquidityFarmWithdrawal_defi" "liquidityPoolDeposit_defi" "liquidityPoolWithdrawal_defi" "liquidityRewards_defi" "liquidityTokenMovement_defi" "loanPayment_defi" "stakingDeposit_defi" "stakingRewards_defi" "stakingWithdrawal_defi" "swap_defi" "withdrawal_defi" "workIncome_defi" "loanDisbursement_defi" "donation_standard" "derivativesFee_standard" "earnRewards_standard" "fee_standard" "forkIncome_standard" "gift_standard" "interestIncome_standard" "interestPayment_standard" "loanDisbursement_standard" "loanPayment_standard" "miningIncome_standard" "nonTaxableEvent_standard" "withdrawal_retail_standard" "sell_standard" "stakingConversion_standard" "stakingConversionNonTaxable_standard" "stakingDeposit_standard" "stakingRewards_standard" "stakingWithdrawal_standard" "transfer_standard" "withdrawal_standard" "workIncome_standard" "open_derivatives" "increase_derivatives" "decrease_derivatives" "close_derivatives" "reverse_derivatives" "funding_realisation_derivatives" "flex_conversion_derivatives"

The tax category to filter by

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pageNumber": 0,
  • "pageSize": 5,
  • "sort": 1,
  • "total": 1
}

Create manual wallet transactions

Allows adding transactions to type manual wallets

Authorizations:
http_bearer
path Parameters
walletId
required
string

The wallet id

Request Body schema: application/json
required

A JSON object containing manual transaction information

Array of objects (manualWalletTransactionDefi)
Array of objects (manualWalletTransactionRegular)

Responses

Request samples

Content type
application/json
{
  • "defi": [
    ],
  • "regular": [
    ]
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pageNumber": 0,
  • "pageSize": 5,
  • "sort": 1,
  • "total": 1
}

Delete manual wallet transactions

Allows deleting multiple manual wallet transactions

Authorizations:
http_bearer
path Parameters
walletId
required
string

The wallet id

Request Body schema: application/json
required
Array
id
string

The id of the transaction

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "errorCode": 400,
  • "status": "invalidBodyParameters",
  • "statusMessage": "id required"
}

Create a new wallet

Creates a new wallet associated with the user, by default type norm which always requires addresses. Type manual is supported if you wish to manually add transactions to a specific wallet by POST to /wallets/{walletId}/transactions

Authorizations:
http_bearer
Request Body schema: application/json
required
accountId
required
string

The account id to be associated with this wallet

addresses
Array of strings
chain
required
string

The chain of the wallet

numberOfSignaturesRequired
string

The number of signatures required for an hd wallet

secretViewKey
string

The secret view key for an hd wallet

type
required
string
Enum: "hd" "manual" "norm"

The wallet type, norm wallets have their addresses harvested from the blockchain if possible

walletName
required
string

The wallet name

xpubs
Array of strings

Responses

Request samples

Content type
application/json
{
  • "accountId": "string",
  • "addresses": [
    ],
  • "chain": "BTC",
  • "numberOfSignaturesRequired": "string",
  • "secretViewKey": "string",
  • "type": "manual",
  • "walletName": "My wallet",
  • "xpubs": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Create manual wallet transactions with file upload

Allows adding transactions to type manual wallets via csv file

Authorizations:
http_bearer
path Parameters
walletId
required
string

The wallet id

Request Body schema: multipart/form-data
required
file
string <binary>

The csv file to upload

type
string

Type of transactions

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pageNumber": 0,
  • "pageSize": 5,
  • "sort": 1,
  • "total": 1
}

Request wallet source synchronization

On demand trigger of wallet source synchronization

Authorizations:
http_bearer
path Parameters
walletId
required
string

The wallet id

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Webhooks

Get available webhook event types

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get webhooks for a project

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create a new webhook

Authorizations:
None
Request Body schema: application/json
required

Request body for creating a webhook

description
string

A description for the webhook

endpointUrl
required
string

The URL to send webhook events to

events
required
Array of strings

An array of event types to subscribe to

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "endpointUrl": "string",
  • "events": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get a specific webhook

Authorizations:
None
path Parameters
id
required
string

The ID of the webhook to retrieve

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update a webhook

Authorizations:
None
path Parameters
id
required
string

The ID of the webhook to update

Request Body schema: application/json
required

Request body for updating a webhook

description
string

A new description for the webhook

endpointUrl
string

A new URL to send webhook events to

events
Array of strings

A new array of event types to subscribe to

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "endpointUrl": "string",
  • "events": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete a webhook

Authorizations:
None
path Parameters
id
required
string

The ID of the webhook to delete

Responses

Get webhook events (delivery attempts)

Authorizations:
None
path Parameters
id
required
string

The ID of the webhook

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pageNumber": 0,
  • "pageSize": 5,
  • "sort": 1,
  • "total": 1
}

Rotate the signing secret for a webhook

Mints a new signing secret, atomically invalidates the previous one, and returns the webhook with the new secret exactly once. The request body must be empty.

Authorizations:
None
path Parameters
id
required
string

The ID of the webhook to rotate the signing secret for

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Resend a webhook event

Authorizations:
None
path Parameters
webhookId
required
string

The ID of the webhook

id
required
string

The ID of the webhook event to resend

Responses