Download OpenAPI specification:
Welcome to Ledgible's data api, you can find here all the documentation relative to version 3.
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,
});
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.
Retrieves all accounts associated with the authenticated user
{- "data": [
- {
- "accountPlan": "string",
- "active": true,
- "disabled": true,
- "fiatCurrency": "string",
- "id": "string",
- "inTrial": true,
- "name": "string",
- "owner": "string",
- "serialUpdateActive": true,
- "setupRequired": true,
- "sourceListView": true,
- "taxUpdater": {
- "customRules": [
- "string"
], - "deletedAddresses": [
- "string"
], - "specIdFeature": true,
- "statsBySource": [
- {
- "lastKnownCount": 0,
- "lastKnownProcessedRecord": "string",
- "sourceId": "string",
- "sourceType": "exchange"
}
], - "taxUpdateFailed": true,
- "taxUpdateInProgress": true,
- "taxUpdateNeedsRerun": true,
- "taxUpdateQueued": true
}, - "timezone": "string",
- "txTableSettings": {
- "defaultTableView": "string",
- "showDust": true,
- "showZeroValue": true
}, - "type": "string",
- "updating": true
}
]
}Creates a new account associated with the user
| name required | string The name of the account |
| timezone required | string A valid IANA timezone |
{- "name": "string",
- "timezone": "America/New_York"
}{- "data": {
- "accountPlan": "string",
- "active": true,
- "disabled": true,
- "fiatCurrency": "string",
- "id": "string",
- "inTrial": true,
- "name": "string",
- "owner": "string",
- "serialUpdateActive": true,
- "setupRequired": true,
- "sourceListView": true,
- "taxUpdater": {
- "customRules": [
- "string"
], - "deletedAddresses": [
- "string"
], - "specIdFeature": true,
- "statsBySource": [
- {
- "lastKnownCount": 0,
- "lastKnownProcessedRecord": "string",
- "sourceId": "string",
- "sourceType": "exchange"
}
], - "taxUpdateFailed": true,
- "taxUpdateInProgress": true,
- "taxUpdateNeedsRerun": true,
- "taxUpdateQueued": true
}, - "timezone": "string",
- "txTableSettings": {
- "defaultTableView": "string",
- "showDust": true,
- "showZeroValue": true
}, - "type": "string",
- "updating": true
}
}Retrieves an account associated with the authenticated user
| accountId required | string The account id |
{- "data": {
- "accountPlan": "string",
- "active": true,
- "disabled": true,
- "fiatCurrency": "string",
- "id": "string",
- "inTrial": true,
- "name": "string",
- "owner": "string",
- "serialUpdateActive": true,
- "setupRequired": true,
- "sourceListView": true,
- "taxUpdater": {
- "customRules": [
- "string"
], - "deletedAddresses": [
- "string"
], - "specIdFeature": true,
- "statsBySource": [
- {
- "lastKnownCount": 0,
- "lastKnownProcessedRecord": "string",
- "sourceId": "string",
- "sourceType": "exchange"
}
], - "taxUpdateFailed": true,
- "taxUpdateInProgress": true,
- "taxUpdateNeedsRerun": true,
- "taxUpdateQueued": true
}, - "timezone": "string",
- "txTableSettings": {
- "defaultTableView": "string",
- "showDust": true,
- "showZeroValue": true
}, - "type": "string",
- "updating": true
}
}Retrieves account balances with the authenticated user
| accountId required | string The account id |
{- "data": {
- "exchangeBalances": [
- {
- "assets": [
- {
- "amount": "string",
- "btcValue": "string",
- "fiatValue": "string",
- "parentChain": "string",
- "symbol": "string",
- "usdValue": "string"
}
], - "fiatCurrency": "string",
- "fiatTotal": "string",
- "id": "string",
- "lastUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "usdTotal": "string"
}
], - "exchangeUsdTotal": "string",
- "walletBalances": [
- {
- "assets": [
- {
- "amount": "string",
- "btcValue": "string",
- "contract": "string",
- "currency": "string",
- "fiatValue": "string",
- "parentChain": "string",
- "symbol": "string",
- "usdValue": "string"
}
], - "fiatCurrency": "string",
- "fiatTotal": "string",
- "id": "string",
- "internalId": "string",
- "name": "string",
- "usdTotal": "string"
}
], - "walletUsdTotal": "string"
}
}Retrieves the account exchanges associated with the authenticated user
| accountId required | string The account id |
{- "data": [
- {
- "accountId": "string",
- "active": true,
- "authenticationFailed": true,
- "exchangeAccountMetaInfo": {
- "accountName": "string",
- "id": "string",
- "ownerInfo": "string"
}, - "exchangeName": "string",
- "id": "string",
- "lastUpdated": {
- "balances": "2019-08-24T14:15:22Z",
- "orders": "2019-08-24T14:15:22Z"
}, - "nickname": "string",
- "recentOrders": [
- {
- "exchangeId": "string",
- "exchangeName": "string",
- "feeCurrency": "string",
- "feeValue": "string",
- "fromAmount": "string",
- "fromCurrency": "string",
- "id": "string",
- "price": "string",
- "priceCurrency": "string",
- "status": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "toAmount": "string",
- "toCurrency": "string",
- "type": "string"
}
], - "sanityIds": { },
- "type": "manual",
- "updaterStartingPoint": { },
- "updating": true
}
]
}Retrieves information about gain/loss for a current tax year, may require sync tax trigger
| accountId required | string The account id |
{- "data": {
- "bySources": [
- {
- "currency": "string",
- "gainLossLongTerm": "string",
- "gainLossShortTerm": "string",
- "sourceId": "string",
- "netInvestedUSD": 0,
- "sourceType": "exchange"
}
], - "gainLossLongTerm": "string",
- "gainLossShortTerm": "string",
- "lastCalculationAt": "2019-08-24T14:15:22Z",
- "netInvestedUSD": 0,
- "taxYear": 0
}
}Retrieves the paginated transaction related to an account
| accountId required | string The account id |
| 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 |
{- "data": [
- {
- "accountId": "string",
- "amount": "string",
- "category": "string",
- "costBasis": "string",
- "costBasisBeforeFees": "string",
- "costBasisTiedFees": "string",
- "currency": "string",
- "feeInFiat": "string",
- "gainLoss": "string",
- "id": "string",
- "ignore": true,
- "isFullyReconciled": true,
- "priceAtTimeOfTx": "string",
- "reconciliations": [
- {
- "amount": 0,
- "costBasis": 0,
- "gainLoss": 0,
- "originalAmount": 0,
- "priceAtTimeOfTx": 0,
- "sourceId": "string",
- "sourceType": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "transactionId": "string",
- "txHash": "string"
}
], - "sourceId": "string",
- "sourceType": "string",
- "timestamp": "string",
- "transactionId": "string",
- "txHash": "string",
- "txSide": "string",
- "type": "string",
- "userChanges": {
- "ignore": true
}, - "userControl": {
- "category": "string",
- "transferMatching": "string"
}
}
], - "pageNumber": 0,
- "pageSize": 5,
- "sort": 1,
- "total": 1
}Retrieves the account wallets associated with the authenticated user
| accountId required | string The account id |
{- "data": [
- {
- "account": "string",
- "accountingSync": true,
- "active": true,
- "addressCount": 0,
- "assets": [
- {
- "currency": "string",
- "symbol": "string"
}
], - "chain": "string",
- "derivePaths": [
- { }
], - "id": "string",
- "internalId": "string",
- "missingAddresses": [
- { }
], - "name": "string",
- "originalId": "string",
- "recentTxs": [
- {
- "blockHash": "string",
- "fee": {
- "amount": "string",
- "currency": "string"
}, - "hash": "string",
- "prices": [
- { }
], - "rawData": {
- "from": "string",
- "input": "string",
- "to": "string"
}, - "status": "completed",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "transferIns": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
], - "transferOuts": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
]
}
], - "sourceId": "string",
- "taxOwnership": "string",
- "type": "hd",
- "updating": true,
- "xpubs": [
- "string"
]
}
]
}Allows partial bulk update of tax transactions reconciliations with spec id, objects with undefined amount will remove spec id reconciliation
| id required | string The account id |
required | Array of objects the tax transaction id list |
{- "taxTransactions": [
- {
- "amount": 0,
- "id": "string"
}
]
}{- "data": [
- {
- "accountId": "string",
- "amount": "string",
- "category": "string",
- "costBasis": "string",
- "costBasisBeforeFees": "string",
- "costBasisTiedFees": "string",
- "currency": "string",
- "feeInFiat": "string",
- "gainLoss": "string",
- "id": "string",
- "ignore": true,
- "isFullyReconciled": true,
- "priceAtTimeOfTx": "string",
- "reconciliations": [
- {
- "amount": 0,
- "costBasis": 0,
- "gainLoss": 0,
- "originalAmount": 0,
- "priceAtTimeOfTx": 0,
- "sourceId": "string",
- "sourceType": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "transactionId": "string",
- "txHash": "string"
}
], - "sourceId": "string",
- "sourceType": "string",
- "timestamp": "string",
- "transactionId": "string",
- "txHash": "string",
- "txSide": "string",
- "type": "string",
- "userChanges": {
- "ignore": true
}, - "userControl": {
- "category": "string",
- "transferMatching": "string"
}
}
]
}Allows partial bulk update of tax category for tax transactions
| id required | string The account id |
| category required | string The category to assign (see tax categories endpoint) |
| ids required | Array of strings the tax transaction id list |
{- "category": "string",
- "ids": [
- "string"
]
}{- "data": [
- {
- "accountId": "string",
- "amount": "string",
- "category": "string",
- "costBasis": "string",
- "costBasisBeforeFees": "string",
- "costBasisTiedFees": "string",
- "currency": "string",
- "feeInFiat": "string",
- "gainLoss": "string",
- "id": "string",
- "ignore": true,
- "isFullyReconciled": true,
- "priceAtTimeOfTx": "string",
- "reconciliations": [
- {
- "amount": 0,
- "costBasis": 0,
- "gainLoss": 0,
- "originalAmount": 0,
- "priceAtTimeOfTx": 0,
- "sourceId": "string",
- "sourceType": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "transactionId": "string",
- "txHash": "string"
}
], - "sourceId": "string",
- "sourceType": "string",
- "timestamp": "string",
- "transactionId": "string",
- "txHash": "string",
- "txSide": "string",
- "type": "string",
- "userChanges": {
- "ignore": true
}, - "userControl": {
- "category": "string",
- "transferMatching": "string"
}
}
]
}Allows single transaction update, updating cost basis will update the entire lot
| id required | string The account id |
| taxTransactionId required | string The tax transaction id |
| price required | string The price to assign as cost basis |
{- "price": "string"
}{- "data": [
- {
- "accountId": "string",
- "amount": "string",
- "category": "string",
- "costBasis": "string",
- "costBasisBeforeFees": "string",
- "costBasisTiedFees": "string",
- "currency": "string",
- "feeInFiat": "string",
- "gainLoss": "string",
- "id": "string",
- "ignore": true,
- "isFullyReconciled": true,
- "priceAtTimeOfTx": "string",
- "reconciliations": [
- {
- "amount": 0,
- "costBasis": 0,
- "gainLoss": 0,
- "originalAmount": 0,
- "priceAtTimeOfTx": 0,
- "sourceId": "string",
- "sourceType": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "transactionId": "string",
- "txHash": "string"
}
], - "sourceId": "string",
- "sourceType": "string",
- "timestamp": "string",
- "transactionId": "string",
- "txHash": "string",
- "txSide": "string",
- "type": "string",
- "userChanges": {
- "ignore": true
}, - "userControl": {
- "category": "string",
- "transferMatching": "string"
}
}
]
}On demand trigger of tax calculator on account
| accountId required | string The account id |
{- "error": "invalid_token",
- "errorCode": 401,
- "error_description": "Invalid token: access token is invalid",
- "status": "unauthorized",
- "statusMessage": "Unauthorized"
}Generates the supportedOAuth provider's connection link for oauth connection
| provider required | string Enum: "coinbase" "qbo" "xero" The OAuth provider identifier |
| accountId required | string The account id |
| redirectUri | string Optional redirect url that will proxy the oauth code and session id required to create the exchange |
{- "accountId": "string",
- "redirectUri": "string"
}{- "data": "string"
}Generates the coinbase connection link for oauth connection. This route is deprecated and will be removed in a future version. Use /authorization/oauth/coinbase instead.
| accountId required | string The account id |
| redirectUri required | string The redirect url that will proxy the oauth code and session id required to create the exchange |
{- "accountId": "string",
- "redirectUri": "string"
}{- "data": "string"
}Retrieves currency information for requested provider and symbols
| 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 |
{- "data": [
- {
- "assetName": "string",
- "chain": "string",
- "contract": "string",
- "createdAt": "string",
- "currency": "string",
- "id": "string",
- "logo": "string",
- "providerName": "string",
- "updatedAt": "string"
}
]
}Retrieves the account exchanges associated with the authenticated user
| accountId required | string The account id |
{- "data": [
- {
- "accountId": "string",
- "active": true,
- "authenticationFailed": true,
- "exchangeAccountMetaInfo": {
- "accountName": "string",
- "id": "string",
- "ownerInfo": "string"
}, - "exchangeName": "string",
- "id": "string",
- "lastUpdated": {
- "balances": "2019-08-24T14:15:22Z",
- "orders": "2019-08-24T14:15:22Z"
}, - "nickname": "string",
- "recentOrders": [
- {
- "exchangeId": "string",
- "exchangeName": "string",
- "feeCurrency": "string",
- "feeValue": "string",
- "fromAmount": "string",
- "fromCurrency": "string",
- "id": "string",
- "price": "string",
- "priceCurrency": "string",
- "status": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "toAmount": "string",
- "toCurrency": "string",
- "type": "string"
}
], - "sanityIds": { },
- "type": "manual",
- "updaterStartingPoint": { },
- "updating": true
}
]
}Retrieves the available exchanges based on auth
| excludeLinks | boolean Include links in exchange instructions |
{- "data": [
- {
- "instructionsForApi": [
- {
- "_key": "string",
- "_type": "string",
- "children": [
- {
- "_type": "string",
- "marks": [
- { }
], - "text": "string",
- "_key": "string"
}
], - "level": 0,
- "listItem": "string",
- "markDefs": [
- { }
], - "style": "string"
}
], - "instructionsForOAuth": [
- {
- "_key": "string",
- "_type": "string",
- "children": [
- {
- "_type": "string",
- "marks": [
- { }
], - "text": "string",
- "_key": "string"
}
], - "level": 0,
- "listItem": "string",
- "markDefs": [
- { }
], - "style": "string"
}
], - "logoUrl": "string",
- "iconLogoUrl": "string",
- "name": "string",
- "requiredCredentials": {
- "apiKey": true,
- "secrets": true,
- "uid": true
}, - "url": "string"
}
]
}Retrieves an exchange associated with the authenticated user
| exchangeId required | string The exchange id |
{- "data": {
- "accountId": "string",
- "active": true,
- "authenticationFailed": true,
- "exchangeAccountMetaInfo": {
- "accountName": "string",
- "id": "string",
- "ownerInfo": "string"
}, - "exchangeName": "string",
- "id": "string",
- "lastUpdated": {
- "balances": "2019-08-24T14:15:22Z",
- "orders": "2019-08-24T14:15:22Z"
}, - "nickname": "string",
- "recentOrders": [
- {
- "exchangeId": "string",
- "exchangeName": "string",
- "feeCurrency": "string",
- "feeValue": "string",
- "fromAmount": "string",
- "fromCurrency": "string",
- "id": "string",
- "price": "string",
- "priceCurrency": "string",
- "status": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "toAmount": "string",
- "toCurrency": "string",
- "type": "string"
}
], - "sanityIds": { },
- "type": "manual",
- "updaterStartingPoint": { },
- "updating": true
}
}Allows updating an exchange
| exchangeId required | string The exchange id |
| name | string The exchange name |
object The secrets object, can be empty json for manual |
{- "name": "string",
- "secrets": {
- "apiKey": "string",
- "secret": "string"
}
}{- "data": {
- "accountId": "string",
- "active": true,
- "authenticationFailed": true,
- "exchangeAccountMetaInfo": {
- "accountName": "string",
- "id": "string",
- "ownerInfo": "string"
}, - "exchangeName": "string",
- "id": "string",
- "lastUpdated": {
- "balances": "2019-08-24T14:15:22Z",
- "orders": "2019-08-24T14:15:22Z"
}, - "nickname": "string",
- "recentOrders": [
- {
- "exchangeId": "string",
- "exchangeName": "string",
- "feeCurrency": "string",
- "feeValue": "string",
- "fromAmount": "string",
- "fromCurrency": "string",
- "id": "string",
- "price": "string",
- "priceCurrency": "string",
- "status": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "toAmount": "string",
- "toCurrency": "string",
- "type": "string"
}
], - "sanityIds": { },
- "type": "manual",
- "updaterStartingPoint": { },
- "updating": true
}
}Retrieves exchange balances associated with the authenticated user
| exchangeId required | string The exchange id |
{- "data": {
- "balances": [
- {
- "assets": [
- {
- "amount": "string",
- "btcValue": "string",
- "fiatValue": "string",
- "parentChain": "string",
- "symbol": "string",
- "usdValue": "string"
}
], - "fiatCurrency": "string",
- "fiatTotal": "string",
- "id": "string",
- "lastUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "usdTotal": "string"
}
], - "usdTotal": "string"
}
}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)
| exchangeId required | string The exchange id |
| 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 |
{- "data": [
- {
- "exchangeId": "string",
- "exchangeName": "string",
- "feeCurrency": "string",
- "feeValue": "string",
- "fromAmount": "string",
- "fromCurrency": "string",
- "id": "string",
- "price": "string",
- "priceCurrency": "string",
- "status": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "toAmount": "string",
- "toCurrency": "string",
- "type": "string"
}
], - "lastUpdated": "2019-08-24T14:15:22Z",
- "pageNumber": 0,
- "pageSize": 5,
- "sort": 1,
- "total": 1
}Allows adding orders to type manual exchanges
| exchangeId required | string The exchange id |
| 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" |
[- {
- "date": "07/14/2023 11:07:10",
- "fee": "0.001",
- "feeCurrency": "BTC",
- "fromAmount": "0.1",
- "fromSymbol": "BTC",
- "id": "1",
- "price": "20000",
- "priceCurrency": "USD",
- "source": "bitstamp",
- "toAmount": "1980",
- "toSymbol": "USD",
- "type": "buy"
}
]{- "data": [
- {
- "exchangeId": "string",
- "exchangeName": "string",
- "feeCurrency": "string",
- "feeValue": "string",
- "fromAmount": "string",
- "fromCurrency": "string",
- "id": "string",
- "price": "string",
- "priceCurrency": "string",
- "status": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "toAmount": "string",
- "toCurrency": "string",
- "type": "string"
}
], - "pageNumber": 0,
- "pageSize": 5,
- "sort": 1,
- "total": 1
}Allows deleting multiple manual exchange orders
| exchangeId required | string The exchange id |
| id | string The id of the transaction |
[- {
- "id": "string"
}
]{- "errorCode": 400,
- "status": "invalidBodyParameters",
- "statusMessage": "id required"
}Creates a new exchange associated with the user
| 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 |
{- "accountId": "string",
- "exchangeName": "binance",
- "exchangeType": "manual",
- "nickname": "string",
- "oauthCode": "string",
- "secrets": {
- "apiKey": "string",
- "secret": "string"
}, - "state": "string"
}{- "data": {
- "accountId": "string",
- "active": true,
- "authenticationFailed": true,
- "exchangeAccountMetaInfo": {
- "accountName": "string",
- "id": "string",
- "ownerInfo": "string"
}, - "exchangeName": "string",
- "id": "string",
- "lastUpdated": {
- "balances": "2019-08-24T14:15:22Z",
- "orders": "2019-08-24T14:15:22Z"
}, - "nickname": "string",
- "recentOrders": [
- {
- "exchangeId": "string",
- "exchangeName": "string",
- "feeCurrency": "string",
- "feeValue": "string",
- "fromAmount": "string",
- "fromCurrency": "string",
- "id": "string",
- "price": "string",
- "priceCurrency": "string",
- "status": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "toAmount": "string",
- "toCurrency": "string",
- "type": "string"
}
], - "sanityIds": { },
- "type": "manual",
- "updaterStartingPoint": { },
- "updating": true
}
}Allows adding orders to type manual exchanges via csv file
| exchangeId required | string The exchange id |
| file | string <binary> The csv file to upload |
{- "data": [
- {
- "exchangeId": "string",
- "exchangeName": "string",
- "feeCurrency": "string",
- "feeValue": "string",
- "fromAmount": "string",
- "fromCurrency": "string",
- "id": "string",
- "price": "string",
- "priceCurrency": "string",
- "status": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "toAmount": "string",
- "toCurrency": "string",
- "type": "string"
}
], - "pageNumber": 0,
- "pageSize": 5,
- "sort": 1,
- "total": 1
}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)
| exchangeId required | string The exchange id |
| 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 |
{- "data": [
- {
- "exchangeId": "string",
- "exchangeName": "string",
- "feeCurrency": "string",
- "feeValue": "string",
- "fromAmount": "string",
- "fromCurrency": "string",
- "id": "string",
- "price": "string",
- "priceCurrency": "string",
- "status": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "toAmount": "string",
- "toCurrency": "string",
- "type": "string"
}
], - "lastUpdated": "2019-08-24T14:15:22Z",
- "pageNumber": 0,
- "pageSize": 5,
- "sort": 1,
- "total": 1
}Allows adding orders to type manual exchanges
| exchangeId required | string The exchange id |
| 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" |
[- {
- "date": "07/14/2023 11:07:10",
- "fee": "0.001",
- "feeCurrency": "BTC",
- "fromAmount": "0.1",
- "fromSymbol": "BTC",
- "id": "1",
- "price": "20000",
- "priceCurrency": "USD",
- "source": "bitstamp",
- "toAmount": "1980",
- "toSymbol": "USD",
- "type": "buy"
}
]{- "data": [
- {
- "exchangeId": "string",
- "exchangeName": "string",
- "feeCurrency": "string",
- "feeValue": "string",
- "fromAmount": "string",
- "fromCurrency": "string",
- "id": "string",
- "price": "string",
- "priceCurrency": "string",
- "status": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "toAmount": "string",
- "toCurrency": "string",
- "type": "string"
}
], - "pageNumber": 0,
- "pageSize": 5,
- "sort": 1,
- "total": 1
}Allows deleting multiple manual exchange orders
| exchangeId required | string The exchange id |
| id | string The id of the transaction |
[- {
- "id": "string"
}
]{- "errorCode": 400,
- "status": "invalidBodyParameters",
- "statusMessage": "id required"
}Allows adding orders to type manual exchanges via csv file
| exchangeId required | string The exchange id |
| file | string <binary> The csv file to upload |
{- "data": [
- {
- "exchangeId": "string",
- "exchangeName": "string",
- "feeCurrency": "string",
- "feeValue": "string",
- "fromAmount": "string",
- "fromCurrency": "string",
- "id": "string",
- "price": "string",
- "priceCurrency": "string",
- "status": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "toAmount": "string",
- "toCurrency": "string",
- "type": "string"
}
], - "pageNumber": 0,
- "pageSize": 5,
- "sort": 1,
- "total": 1
}Retrieves a single order
| orderId required | string The id of the order |
{- "data": {
- "exchangeId": "string",
- "exchangeName": "string",
- "feeCurrency": "string",
- "feeValue": "string",
- "fromAmount": "string",
- "fromCurrency": "string",
- "id": "string",
- "price": "string",
- "priceCurrency": "string",
- "status": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "toAmount": "string",
- "toCurrency": "string",
- "type": "string"
}
}Add a new user to the project
| email required | string The user email to add to the project |
{- "email": "string"
}{- "data": {
- "id": "string",
- "projectId": "string",
- "userId": "string"
}
}Add a new RSA key to the project
| 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) |
{- "name": "string",
- "publicKey": "string"
}{- "data": {
- "active": true,
- "createdAt": "string",
- "id": "string",
- "name": "string",
- "projectId": "string",
- "publicKey": "string"
}
}Update RSA key properties
| keyId required | string |
| name | string The name for the RSA key |
| active | boolean Whether the key is active |
{- "name": "string",
- "active": true
}{- "data": {
- "active": true,
- "createdAt": "string",
- "id": "string",
- "name": "string",
- "projectId": "string",
- "publicKey": "string"
}
}Delete an RSA key from the project
| keyId required | string |
{- "error": "invalid_token",
- "errorCode": 401,
- "error_description": "Invalid token: access token is invalid",
- "status": "unauthorized",
- "statusMessage": "Unauthorized"
}Allows updating project name and active flag
| active | boolean Activate or deactivate the project |
| name | string The project name |
{- "active": true,
- "name": "string"
}{- "data": {
- "active": true,
- "createdAt": "string",
- "id": "string",
- "name": "string",
- "ownerId": "string",
- "teamMemberCount": 0
}, - "type": null
}Retrieves the paginated transaction related to an account
| accountId required | string The account id |
| 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 |
{- "data": [
- {
- "accountId": "string",
- "amount": "string",
- "category": "string",
- "costBasis": "string",
- "costBasisBeforeFees": "string",
- "costBasisTiedFees": "string",
- "currency": "string",
- "feeInFiat": "string",
- "gainLoss": "string",
- "id": "string",
- "ignore": true,
- "isFullyReconciled": true,
- "priceAtTimeOfTx": "string",
- "reconciliations": [
- {
- "amount": 0,
- "costBasis": 0,
- "gainLoss": 0,
- "originalAmount": 0,
- "priceAtTimeOfTx": 0,
- "sourceId": "string",
- "sourceType": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "transactionId": "string",
- "txHash": "string"
}
], - "sourceId": "string",
- "sourceType": "string",
- "timestamp": "string",
- "transactionId": "string",
- "txHash": "string",
- "txSide": "string",
- "type": "string",
- "userChanges": {
- "ignore": true
}, - "userControl": {
- "category": "string",
- "transferMatching": "string"
}
}
], - "pageNumber": 0,
- "pageSize": 5,
- "sort": 1,
- "total": 1
}Allows partial bulk update of tax transactions reconciliations with spec id, objects with undefined amount will remove spec id reconciliation
| id required | string The account id |
required | Array of objects the tax transaction id list |
{- "taxTransactions": [
- {
- "amount": 0,
- "id": "string"
}
]
}{- "data": [
- {
- "accountId": "string",
- "amount": "string",
- "category": "string",
- "costBasis": "string",
- "costBasisBeforeFees": "string",
- "costBasisTiedFees": "string",
- "currency": "string",
- "feeInFiat": "string",
- "gainLoss": "string",
- "id": "string",
- "ignore": true,
- "isFullyReconciled": true,
- "priceAtTimeOfTx": "string",
- "reconciliations": [
- {
- "amount": 0,
- "costBasis": 0,
- "gainLoss": 0,
- "originalAmount": 0,
- "priceAtTimeOfTx": 0,
- "sourceId": "string",
- "sourceType": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "transactionId": "string",
- "txHash": "string"
}
], - "sourceId": "string",
- "sourceType": "string",
- "timestamp": "string",
- "transactionId": "string",
- "txHash": "string",
- "txSide": "string",
- "type": "string",
- "userChanges": {
- "ignore": true
}, - "userControl": {
- "category": "string",
- "transferMatching": "string"
}
}
]
}Allows partial bulk update of tax category for tax transactions
| id required | string The account id |
| category required | string The category to assign (see tax categories endpoint) |
| ids required | Array of strings the tax transaction id list |
{- "category": "string",
- "ids": [
- "string"
]
}{- "data": [
- {
- "accountId": "string",
- "amount": "string",
- "category": "string",
- "costBasis": "string",
- "costBasisBeforeFees": "string",
- "costBasisTiedFees": "string",
- "currency": "string",
- "feeInFiat": "string",
- "gainLoss": "string",
- "id": "string",
- "ignore": true,
- "isFullyReconciled": true,
- "priceAtTimeOfTx": "string",
- "reconciliations": [
- {
- "amount": 0,
- "costBasis": 0,
- "gainLoss": 0,
- "originalAmount": 0,
- "priceAtTimeOfTx": 0,
- "sourceId": "string",
- "sourceType": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "transactionId": "string",
- "txHash": "string"
}
], - "sourceId": "string",
- "sourceType": "string",
- "timestamp": "string",
- "transactionId": "string",
- "txHash": "string",
- "txSide": "string",
- "type": "string",
- "userChanges": {
- "ignore": true
}, - "userControl": {
- "category": "string",
- "transferMatching": "string"
}
}
]
}Allows single transaction update, updating cost basis will update the entire lot
| id required | string The account id |
| taxTransactionId required | string The tax transaction id |
| price required | string The price to assign as cost basis |
{- "price": "string"
}{- "data": [
- {
- "accountId": "string",
- "amount": "string",
- "category": "string",
- "costBasis": "string",
- "costBasisBeforeFees": "string",
- "costBasisTiedFees": "string",
- "currency": "string",
- "feeInFiat": "string",
- "gainLoss": "string",
- "id": "string",
- "ignore": true,
- "isFullyReconciled": true,
- "priceAtTimeOfTx": "string",
- "reconciliations": [
- {
- "amount": 0,
- "costBasis": 0,
- "gainLoss": 0,
- "originalAmount": 0,
- "priceAtTimeOfTx": 0,
- "sourceId": "string",
- "sourceType": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "transactionId": "string",
- "txHash": "string"
}
], - "sourceId": "string",
- "sourceType": "string",
- "timestamp": "string",
- "transactionId": "string",
- "txHash": "string",
- "txSide": "string",
- "type": "string",
- "userChanges": {
- "ignore": true
}, - "userControl": {
- "category": "string",
- "transferMatching": "string"
}
}
]
}On demand trigger of tax calculator on account
| accountId required | string The account id |
{- "error": "invalid_token",
- "errorCode": 401,
- "error_description": "Invalid token: access token is invalid",
- "status": "unauthorized",
- "statusMessage": "Unauthorized"
}Retrieves the paginated transaction events
| transactionHash required | string The transaction hash |
| 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 |
{- "data": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
], - "pageNumber": 0,
- "pageSize": 5,
- "sort": 1,
- "total": 1
}Retrieves paginated wallet transactions, embedded transferIns and transferOuts limited to 50, for more transaction events please use the /transactions/{hash}/events endpoint.
| walletId required | string The wallet id |
| 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 |
{- "data": [
- {
- "blockHash": "string",
- "fee": {
- "amount": "string",
- "currency": "string"
}, - "hash": "string",
- "prices": [
- { }
], - "rawData": {
- "from": "string",
- "input": "string",
- "to": "string"
}, - "status": "completed",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "transferIns": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
], - "transferOuts": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
]
}
], - "pageNumber": 0,
- "pageSize": 5,
- "sort": 1,
- "total": 1
}Allows adding transactions to type manual wallets
| walletId required | string The wallet id |
A JSON object containing manual transaction information
Array of objects (manualWalletTransactionDefi) | |
Array of objects (manualWalletTransactionRegular) |
{- "defi": [
- {
- "amount1": "string",
- "amount2": "string",
- "amount3": "string",
- "amount4": "string",
- "asset1": "string",
- "asset2": "string",
- "asset3": "string",
- "asset4": "string",
- "chain": "string",
- "date": "string",
- "defiSource": "string",
- "fee": "string",
- "feeCurrency": "string",
- "type": "liquidity-deposit"
}
], - "regular": [
- {
- "amount": "string",
- "date": "string",
- "price": "string",
- "priceCurrency": "string",
- "symbol": "string",
- "type": "transfer-in"
}
]
}{- "data": [
- {
- "blockHash": "string",
- "fee": {
- "amount": "string",
- "currency": "string"
}, - "hash": "string",
- "prices": [
- { }
], - "rawData": {
- "from": "string",
- "input": "string",
- "to": "string"
}, - "status": "completed",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "transferIns": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
], - "transferOuts": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
]
}
], - "pageNumber": 0,
- "pageSize": 5,
- "sort": 1,
- "total": 1
}Allows deleting multiple manual wallet transactions
| walletId required | string The wallet id |
| id | string The id of the transaction |
[- {
- "id": "string"
}
]{- "errorCode": 400,
- "status": "invalidBodyParameters",
- "statusMessage": "id required"
}Allows adding transactions to type manual wallets via csv file
| walletId required | string The wallet id |
| file | string <binary> The csv file to upload |
| type | string Type of transactions |
{- "data": [
- {
- "blockHash": "string",
- "fee": {
- "amount": "string",
- "currency": "string"
}, - "hash": "string",
- "prices": [
- { }
], - "rawData": {
- "from": "string",
- "input": "string",
- "to": "string"
}, - "status": "completed",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "transferIns": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
], - "transferOuts": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
]
}
], - "pageNumber": 0,
- "pageSize": 5,
- "sort": 1,
- "total": 1
}Retrieves the account wallets associated with the authenticated user
| accountId required | string The account id |
{- "data": [
- {
- "account": "string",
- "accountingSync": true,
- "active": true,
- "addressCount": 0,
- "assets": [
- {
- "currency": "string",
- "symbol": "string"
}
], - "chain": "string",
- "derivePaths": [
- { }
], - "id": "string",
- "internalId": "string",
- "missingAddresses": [
- { }
], - "name": "string",
- "originalId": "string",
- "recentTxs": [
- {
- "blockHash": "string",
- "fee": {
- "amount": "string",
- "currency": "string"
}, - "hash": "string",
- "prices": [
- { }
], - "rawData": {
- "from": "string",
- "input": "string",
- "to": "string"
}, - "status": "completed",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "transferIns": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
], - "transferOuts": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
]
}
], - "sourceId": "string",
- "taxOwnership": "string",
- "type": "hd",
- "updating": true,
- "xpubs": [
- "string"
]
}
]
}Retrieves a wallet associated with the authenticated user
| walletId required | string The wallet id |
{- "data": {
- "account": "string",
- "accountingSync": true,
- "active": true,
- "addressCount": 0,
- "assets": [
- {
- "currency": "string",
- "symbol": "string"
}
], - "chain": "string",
- "derivePaths": [
- { }
], - "id": "string",
- "internalId": "string",
- "missingAddresses": [
- { }
], - "name": "string",
- "originalId": "string",
- "recentTxs": [
- {
- "blockHash": "string",
- "fee": {
- "amount": "string",
- "currency": "string"
}, - "hash": "string",
- "prices": [
- { }
], - "rawData": {
- "from": "string",
- "input": "string",
- "to": "string"
}, - "status": "completed",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "transferIns": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
], - "transferOuts": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
]
}
], - "sourceId": "string",
- "taxOwnership": "string",
- "type": "hd",
- "updating": true,
- "xpubs": [
- "string"
]
}
}Allows updating a wallet
| walletId required | string The wallet id |
| addresses | Array of strings An array of addresses to add to this wallet |
| name | string The wallet name |
{- "addresses": [
- "string"
], - "name": "string"
}{- "data": {
- "account": "string",
- "accountingSync": true,
- "active": true,
- "addressCount": 0,
- "assets": [
- {
- "currency": "string",
- "symbol": "string"
}
], - "chain": "string",
- "derivePaths": [
- { }
], - "id": "string",
- "internalId": "string",
- "missingAddresses": [
- { }
], - "name": "string",
- "originalId": "string",
- "recentTxs": [
- {
- "blockHash": "string",
- "fee": {
- "amount": "string",
- "currency": "string"
}, - "hash": "string",
- "prices": [
- { }
], - "rawData": {
- "from": "string",
- "input": "string",
- "to": "string"
}, - "status": "completed",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "transferIns": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
], - "transferOuts": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
]
}
], - "sourceId": "string",
- "taxOwnership": "string",
- "type": "hd",
- "updating": true,
- "xpubs": [
- "string"
]
}
}Retrieves paginated addresses from a given wallet
| walletId required | string The wallet id |
| pageNumber | integer The page number |
| pageSize | integer The number of transactions per page |
{- "data": [
- "string"
], - "pageNumber": 0,
- "pageSize": 5,
- "sort": 1,
- "total": 1
}Retrieves wallets associated with the authenticated user
| walletId required | string The wallet id |
{- "data": {
- "balances": [
- {
- "assets": [
- {
- "amount": "string",
- "btcValue": "string",
- "contract": "string",
- "currency": "string",
- "fiatValue": "string",
- "parentChain": "string",
- "symbol": "string",
- "usdValue": "string"
}
], - "fiatCurrency": "string",
- "fiatTotal": "string",
- "id": "string",
- "internalId": "string",
- "name": "string",
- "usdTotal": "string"
}
], - "usdTotal": "string"
}
}Retrieves paginated wallet transactions, embedded transferIns and transferOuts limited to 50, for more transaction events please use the /transactions/{hash}/events endpoint.
| walletId required | string The wallet id |
| 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 |
{- "data": [
- {
- "blockHash": "string",
- "fee": {
- "amount": "string",
- "currency": "string"
}, - "hash": "string",
- "prices": [
- { }
], - "rawData": {
- "from": "string",
- "input": "string",
- "to": "string"
}, - "status": "completed",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "transferIns": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
], - "transferOuts": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
]
}
], - "pageNumber": 0,
- "pageSize": 5,
- "sort": 1,
- "total": 1
}Allows adding transactions to type manual wallets
| walletId required | string The wallet id |
A JSON object containing manual transaction information
Array of objects (manualWalletTransactionDefi) | |
Array of objects (manualWalletTransactionRegular) |
{- "defi": [
- {
- "amount1": "string",
- "amount2": "string",
- "amount3": "string",
- "amount4": "string",
- "asset1": "string",
- "asset2": "string",
- "asset3": "string",
- "asset4": "string",
- "chain": "string",
- "date": "string",
- "defiSource": "string",
- "fee": "string",
- "feeCurrency": "string",
- "type": "liquidity-deposit"
}
], - "regular": [
- {
- "amount": "string",
- "date": "string",
- "price": "string",
- "priceCurrency": "string",
- "symbol": "string",
- "type": "transfer-in"
}
]
}{- "data": [
- {
- "blockHash": "string",
- "fee": {
- "amount": "string",
- "currency": "string"
}, - "hash": "string",
- "prices": [
- { }
], - "rawData": {
- "from": "string",
- "input": "string",
- "to": "string"
}, - "status": "completed",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "transferIns": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
], - "transferOuts": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
]
}
], - "pageNumber": 0,
- "pageSize": 5,
- "sort": 1,
- "total": 1
}Allows deleting multiple manual wallet transactions
| walletId required | string The wallet id |
| id | string The id of the transaction |
[- {
- "id": "string"
}
]{- "errorCode": 400,
- "status": "invalidBodyParameters",
- "statusMessage": "id required"
}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
| 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 |
{- "accountId": "string",
- "addresses": [
- "string"
], - "chain": "BTC",
- "numberOfSignaturesRequired": "string",
- "secretViewKey": "string",
- "type": "manual",
- "walletName": "My wallet",
- "xpubs": [
- "string"
]
}{- "data": {
- "account": "string",
- "accountingSync": true,
- "active": true,
- "addressCount": 0,
- "assets": [
- {
- "currency": "string",
- "symbol": "string"
}
], - "chain": "string",
- "derivePaths": [
- { }
], - "id": "string",
- "internalId": "string",
- "missingAddresses": [
- { }
], - "name": "string",
- "originalId": "string",
- "recentTxs": [
- {
- "blockHash": "string",
- "fee": {
- "amount": "string",
- "currency": "string"
}, - "hash": "string",
- "prices": [
- { }
], - "rawData": {
- "from": "string",
- "input": "string",
- "to": "string"
}, - "status": "completed",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "transferIns": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
], - "transferOuts": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
]
}
], - "sourceId": "string",
- "taxOwnership": "string",
- "type": "hd",
- "updating": true,
- "xpubs": [
- "string"
]
}
}Allows adding transactions to type manual wallets via csv file
| walletId required | string The wallet id |
| file | string <binary> The csv file to upload |
| type | string Type of transactions |
{- "data": [
- {
- "blockHash": "string",
- "fee": {
- "amount": "string",
- "currency": "string"
}, - "hash": "string",
- "prices": [
- { }
], - "rawData": {
- "from": "string",
- "input": "string",
- "to": "string"
}, - "status": "completed",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "transferIns": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
], - "transferOuts": [
- {
- "address": "string",
- "amount": "string",
- "chain": "string",
- "currency": "string",
- "input": true,
- "status": "completed",
- "symbol": "string",
- "taxCategory": "acquisition_standard",
- "timestamp": "2019-08-24T14:15:22Z",
- "txHash": "string",
- "type": "string"
}
]
}
], - "pageNumber": 0,
- "pageSize": 5,
- "sort": 1,
- "total": 1
}{- "data": [
- {
- "id": "e4a2c4e6-77a8-4425-88f3-1a23e80f48f4",
- "projectId": "a4a2c4e6-77a8-4425-88f3-1a23e80f48f4",
- "description": "My production webhook",
- "events": [
- "transaction.created",
- "transaction.updated"
], - "hasSigningSecret": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}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 |
{- "description": "string",
- "endpointUrl": "string",
- "events": [
- "string"
]
}{- "data": {
- "id": "e4a2c4e6-77a8-4425-88f3-1a23e80f48f4",
- "projectId": "a4a2c4e6-77a8-4425-88f3-1a23e80f48f4",
- "description": "My production webhook",
- "events": [
- "transaction.created",
- "transaction.updated"
], - "hasSigningSecret": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "signingSecret": "whsec_1234567890abcdef"
}
}| id required | string The ID of the webhook to retrieve |
{- "data": {
- "id": "e4a2c4e6-77a8-4425-88f3-1a23e80f48f4",
- "projectId": "a4a2c4e6-77a8-4425-88f3-1a23e80f48f4",
- "description": "My production webhook",
- "events": [
- "transaction.created",
- "transaction.updated"
], - "hasSigningSecret": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}| id required | string The ID of the webhook to update |
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 |
{- "description": "string",
- "endpointUrl": "string",
- "events": [
- "string"
]
}{- "data": {
- "id": "e4a2c4e6-77a8-4425-88f3-1a23e80f48f4",
- "projectId": "a4a2c4e6-77a8-4425-88f3-1a23e80f48f4",
- "description": "My production webhook",
- "events": [
- "transaction.created",
- "transaction.updated"
], - "hasSigningSecret": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}| id required | string The ID of the webhook |
{- "data": [
- {
- "id": "e4a2c4e6-77a8-4425-88f3-1a23e80f48f4",
- "webhookId": "a4a2c4e6-77a8-4425-88f3-1a23e80f48f4",
- "name": "transaction.created",
- "status": "delivered",
- "request": { },
- "response": {
- "status": 502,
- "code": "ECONNREFUSED",
- "error": "connect ECONNREFUSED"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
], - "pageNumber": 0,
- "pageSize": 5,
- "sort": 1,
- "total": 1
}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.
| id required | string The ID of the webhook to rotate the signing secret for |
{- "data": {
- "id": "e4a2c4e6-77a8-4425-88f3-1a23e80f48f4",
- "projectId": "a4a2c4e6-77a8-4425-88f3-1a23e80f48f4",
- "description": "My production webhook",
- "events": [
- "transaction.created",
- "transaction.updated"
], - "hasSigningSecret": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "signingSecret": "whsec_1234567890abcdef"
}
}