diff --git a/v2/api-validator/src/client/generated/index.ts b/v2/api-validator/src/client/generated/index.ts index db9050b3..4e4d662d 100644 --- a/v2/api-validator/src/client/generated/index.ts +++ b/v2/api-validator/src/client/generated/index.ts @@ -33,6 +33,7 @@ export type { AssetReference } from './models/AssetReference'; export { BadRequestError } from './models/BadRequestError'; export type { Balances } from './models/Balances'; export type { BankAccountNumber } from './models/BankAccountNumber'; +export { BasisPointsFeeAmount } from './models/BasisPointsFeeAmount'; export { Bep20Token } from './models/Bep20Token'; export { Blockchain } from './models/Blockchain'; export type { BlockchainCapabilityWithOptionalAddress } from './models/BlockchainCapabilityWithOptionalAddress'; @@ -42,6 +43,7 @@ export type { Bridge } from './models/Bridge'; export type { BridgeCapability } from './models/BridgeCapability'; export { BridgeProperties } from './models/BridgeProperties'; export type { BridgePropertiesWithPaymentInstructions } from './models/BridgePropertiesWithPaymentInstructions'; +export type { BridgeReceipt } from './models/BridgeReceipt'; export { BucketAsset } from './models/BucketAsset'; export { BusinessIdentificationInfo } from './models/BusinessIdentificationInfo'; export type { Capabilities } from './models/Capabilities'; @@ -92,12 +94,15 @@ export type { EuropeanSEPAAddress } from './models/EuropeanSEPAAddress'; export { EuropeanSEPACapability } from './models/EuropeanSEPACapability'; export type { EuropeanSEPATransfer } from './models/EuropeanSEPATransfer'; export type { EuropeanSEPATransferDestination } from './models/EuropeanSEPATransferDestination'; +export { Fee } from './models/Fee'; +export type { FeeAmount } from './models/FeeAmount'; export type { FiatAddress } from './models/FiatAddress'; export type { FiatCapability } from './models/FiatCapability'; export type { FiatTransfer } from './models/FiatTransfer'; export type { FiatTransferDestination } from './models/FiatTransferDestination'; export type { FiatWithdrawal } from './models/FiatWithdrawal'; export type { FiatWithdrawalRequest } from './models/FiatWithdrawalRequest'; +export { FixedFeeAmount } from './models/FixedFeeAmount'; export type { FullName } from './models/FullName'; export { GeneralError } from './models/GeneralError'; export type { Iban } from './models/Iban'; @@ -137,10 +142,12 @@ export type { OffRamp } from './models/OffRamp'; export type { OffRampCapability } from './models/OffRampCapability'; export { OffRampProperties } from './models/OffRampProperties'; export type { OffRampPropertiesWithPaymentInstructions } from './models/OffRampPropertiesWithPaymentInstructions'; +export type { OffRampReceipt } from './models/OffRampReceipt'; export type { OnRamp } from './models/OnRamp'; export type { OnRampCapability } from './models/OnRampCapability'; export { OnRampProperties } from './models/OnRampProperties'; export type { OnRampPropertiesWithPaymentInstructions } from './models/OnRampPropertiesWithPaymentInstructions'; +export type { OnRampReceipt } from './models/OnRampReceipt'; export type { Order } from './models/Order'; export type { OrderBook } from './models/OrderBook'; export type { OrderBookPairIdQueryParam } from './models/OrderBookPairIdQueryParam'; diff --git a/v2/api-validator/src/client/generated/models/BasisPointsFeeAmount.ts b/v2/api-validator/src/client/generated/models/BasisPointsFeeAmount.ts new file mode 100644 index 00000000..4bcfb58f --- /dev/null +++ b/v2/api-validator/src/client/generated/models/BasisPointsFeeAmount.ts @@ -0,0 +1,22 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type BasisPointsFeeAmount = { + amountType: BasisPointsFeeAmount.amountType; + /** + * Basis points (bps) - 1 is 0.01% and 10000 is 100% + */ + amount: number; +}; + +export namespace BasisPointsFeeAmount { + + export enum amountType { + BASIS_POINTS = 'BASIS_POINTS', + } + + +} + diff --git a/v2/api-validator/src/client/generated/models/Bridge.ts b/v2/api-validator/src/client/generated/models/Bridge.ts index 988b142a..d135342a 100644 --- a/v2/api-validator/src/client/generated/models/Bridge.ts +++ b/v2/api-validator/src/client/generated/models/Bridge.ts @@ -4,11 +4,11 @@ /* eslint-disable */ import type { BridgePropertiesWithPaymentInstructions } from './BridgePropertiesWithPaymentInstructions'; +import type { BridgeReceipt } from './BridgeReceipt'; import type { CommonRamp } from './CommonRamp'; import type { PrefundedBridgeProperties } from './PrefundedBridgeProperties'; -import type { PublicBlockchainTransaction } from './PublicBlockchainTransaction'; export type Bridge = (CommonRamp & (BridgePropertiesWithPaymentInstructions | PrefundedBridgeProperties) & { - receipt?: PublicBlockchainTransaction; + receipt?: BridgeReceipt; }); diff --git a/v2/api-validator/src/client/generated/models/BridgeReceipt.ts b/v2/api-validator/src/client/generated/models/BridgeReceipt.ts new file mode 100644 index 00000000..37d95109 --- /dev/null +++ b/v2/api-validator/src/client/generated/models/BridgeReceipt.ts @@ -0,0 +1,12 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { PublicBlockchainTransaction } from './PublicBlockchainTransaction'; +import type { RampFees } from './RampFees'; + +export type BridgeReceipt = (PublicBlockchainTransaction & { + actualFees?: RampFees; +}); + diff --git a/v2/api-validator/src/client/generated/models/CommonRamp.ts b/v2/api-validator/src/client/generated/models/CommonRamp.ts index 62c1c8ee..16e4eb5f 100644 --- a/v2/api-validator/src/client/generated/models/CommonRamp.ts +++ b/v2/api-validator/src/client/generated/models/CommonRamp.ts @@ -14,7 +14,7 @@ export type CommonRamp = { updatedAt: string; status: RampStatus; amount: PositiveAmount; - fees?: RampFees; + estimatedFees?: RampFees; executionDetails?: OrderQuote; /** * Ramp expiration time. diff --git a/v2/api-validator/src/client/generated/models/Fee.ts b/v2/api-validator/src/client/generated/models/Fee.ts new file mode 100644 index 00000000..237f434c --- /dev/null +++ b/v2/api-validator/src/client/generated/models/Fee.ts @@ -0,0 +1,34 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { AssetReference } from './AssetReference'; +import type { FeeAmount } from './FeeAmount'; + +export type Fee = { + /** + * Specifies the category of fee applied to the transaction. - ORDER - Fee charged by the platform for executing the trade. - NETWORK - Blockchain network fee paid to validators/miners. - SPREAD - Implicit cost built into the price difference between quotes. - REBATE - Negative fee returned to the user as a reward or incentive. + * + */ + feeType: Fee.feeType; + feeAsset: AssetReference; + fee: FeeAmount; +}; + +export namespace Fee { + + /** + * Specifies the category of fee applied to the transaction. - ORDER - Fee charged by the platform for executing the trade. - NETWORK - Blockchain network fee paid to validators/miners. - SPREAD - Implicit cost built into the price difference between quotes. - REBATE - Negative fee returned to the user as a reward or incentive. + * + */ + export enum feeType { + ORDER = 'ORDER', + NETWORK = 'NETWORK', + SPREAD = 'SPREAD', + REBATE = 'REBATE', + } + + +} + diff --git a/v2/api-validator/src/client/generated/models/FeeAmount.ts b/v2/api-validator/src/client/generated/models/FeeAmount.ts new file mode 100644 index 00000000..d9edf3ba --- /dev/null +++ b/v2/api-validator/src/client/generated/models/FeeAmount.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { BasisPointsFeeAmount } from './BasisPointsFeeAmount'; +import type { FixedFeeAmount } from './FixedFeeAmount'; + +export type FeeAmount = (FixedFeeAmount | BasisPointsFeeAmount); + diff --git a/v2/api-validator/src/client/generated/models/FixedFeeAmount.ts b/v2/api-validator/src/client/generated/models/FixedFeeAmount.ts new file mode 100644 index 00000000..7ea4e764 --- /dev/null +++ b/v2/api-validator/src/client/generated/models/FixedFeeAmount.ts @@ -0,0 +1,21 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { PositiveAmount } from './PositiveAmount'; + +export type FixedFeeAmount = { + amountType: FixedFeeAmount.amountType; + amount: PositiveAmount; +}; + +export namespace FixedFeeAmount { + + export enum amountType { + FIXED = 'FIXED', + } + + +} + diff --git a/v2/api-validator/src/client/generated/models/OffRamp.ts b/v2/api-validator/src/client/generated/models/OffRamp.ts index 8aa9af4e..272b63f8 100644 --- a/v2/api-validator/src/client/generated/models/OffRamp.ts +++ b/v2/api-validator/src/client/generated/models/OffRamp.ts @@ -5,10 +5,10 @@ import type { CommonRamp } from './CommonRamp'; import type { OffRampPropertiesWithPaymentInstructions } from './OffRampPropertiesWithPaymentInstructions'; +import type { OffRampReceipt } from './OffRampReceipt'; import type { PrefundedOffRampProperties } from './PrefundedOffRampProperties'; -import type { RampFiatTransfer } from './RampFiatTransfer'; export type OffRamp = (CommonRamp & (OffRampPropertiesWithPaymentInstructions | PrefundedOffRampProperties) & { - receipt?: RampFiatTransfer; + receipt?: OffRampReceipt; }); diff --git a/v2/api-validator/src/client/generated/models/OffRampReceipt.ts b/v2/api-validator/src/client/generated/models/OffRampReceipt.ts new file mode 100644 index 00000000..2ddccd4d --- /dev/null +++ b/v2/api-validator/src/client/generated/models/OffRampReceipt.ts @@ -0,0 +1,12 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { RampFees } from './RampFees'; +import type { RampFiatTransfer } from './RampFiatTransfer'; + +export type OffRampReceipt = (RampFiatTransfer & { + actualFees?: RampFees; +}); + diff --git a/v2/api-validator/src/client/generated/models/OnRamp.ts b/v2/api-validator/src/client/generated/models/OnRamp.ts index ceaa3d57..63637ecc 100644 --- a/v2/api-validator/src/client/generated/models/OnRamp.ts +++ b/v2/api-validator/src/client/generated/models/OnRamp.ts @@ -5,10 +5,10 @@ import type { CommonRamp } from './CommonRamp'; import type { OnRampPropertiesWithPaymentInstructions } from './OnRampPropertiesWithPaymentInstructions'; +import type { OnRampReceipt } from './OnRampReceipt'; import type { PrefundedOnRampProperties } from './PrefundedOnRampProperties'; -import type { PublicBlockchainTransaction } from './PublicBlockchainTransaction'; export type OnRamp = (CommonRamp & (OnRampPropertiesWithPaymentInstructions | PrefundedOnRampProperties) & { - receipt?: PublicBlockchainTransaction; + receipt?: OnRampReceipt; }); diff --git a/v2/api-validator/src/client/generated/models/OnRampReceipt.ts b/v2/api-validator/src/client/generated/models/OnRampReceipt.ts new file mode 100644 index 00000000..63154d66 --- /dev/null +++ b/v2/api-validator/src/client/generated/models/OnRampReceipt.ts @@ -0,0 +1,12 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { PublicBlockchainTransaction } from './PublicBlockchainTransaction'; +import type { RampFees } from './RampFees'; + +export type OnRampReceipt = (PublicBlockchainTransaction & { + actualFees?: RampFees; +}); + diff --git a/v2/api-validator/src/client/generated/models/Quote.ts b/v2/api-validator/src/client/generated/models/Quote.ts index 253a8b38..d30ed251 100644 --- a/v2/api-validator/src/client/generated/models/Quote.ts +++ b/v2/api-validator/src/client/generated/models/Quote.ts @@ -17,6 +17,7 @@ export type Quote = { * Conversion fee in basis points. The amounts are expected to include the fee. */ conversionFeeBps: number; + conversionFeeAsset?: AssetReference; status: QuoteStatus; /** * Quote creation time. diff --git a/v2/api-validator/src/client/generated/models/RampFees.ts b/v2/api-validator/src/client/generated/models/RampFees.ts index c5cf0bce..ad396dba 100644 --- a/v2/api-validator/src/client/generated/models/RampFees.ts +++ b/v2/api-validator/src/client/generated/models/RampFees.ts @@ -3,17 +3,6 @@ /* tslint:disable */ /* eslint-disable */ -/** - * Fees associated with the ramp transfer. - */ -export type RampFees = { - /** - * Fees charged from the sub-account in basis points. - */ - subAccount?: number; - /** - * Fees charged by the provider for the ramp service in basis points. - */ - provider?: number; -}; +import type { Fee } from './Fee'; +export type RampFees = Array; diff --git a/v2/api-validator/src/server/controllers/liquidity-controller.ts b/v2/api-validator/src/server/controllers/liquidity-controller.ts index 56ad342c..c50e8fa4 100644 --- a/v2/api-validator/src/server/controllers/liquidity-controller.ts +++ b/v2/api-validator/src/server/controllers/liquidity-controller.ts @@ -105,6 +105,7 @@ export class LiquidityController { fromAsset, toAsset, conversionFeeBps: 1, + conversionFeeAsset: fromAsset, createdAt: new Date(Date.now()).toISOString(), expiresAt: new Date(Date.now() + QUOTE_EXPIRATION_IN_MS).toISOString(), id: randomUUID(), diff --git a/v2/api-validator/src/server/controllers/ramps-controller.ts b/v2/api-validator/src/server/controllers/ramps-controller.ts index 0bc8779a..cdce0fbb 100644 --- a/v2/api-validator/src/server/controllers/ramps-controller.ts +++ b/v2/api-validator/src/server/controllers/ramps-controller.ts @@ -64,7 +64,7 @@ export class RampsController { } const knownAssetIds = AssetsController.getAllAdditionalAssets().map((a) => a.id); - injectKnownAssetIdsToRampsAssetObjects(knownAssetIds, this.rampsRepository); + injectKnownAssetIdsToRamps(knownAssetIds, this.rampsRepository); } private loadRampMethods() { @@ -75,7 +75,7 @@ export class RampsController { this.rampMethodRepository.create(capability); } const knownAssetIds = AssetsController.getAllAdditionalAssets().map((a) => a.id); - injectKnownAssetIdsToRampsAssetObjects(knownAssetIds, this.rampMethodRepository); + injectKnownAssetIdsToRampsMethods(knownAssetIds, this.rampMethodRepository); } private static generateRampMethods() { @@ -143,7 +143,7 @@ export class RampsController { // eslint-disable-next-line @typescript-eslint/no-unused-vars const { idempotencyKey, ...rampProps } = ramp; let paymentInstructions; - + let status = RampStatus.PENDING; if ( ramp.type === OffRampProperties.type.OFF_RAMP || ramp.type === BridgeProperties.type.BRIDGE @@ -154,6 +154,7 @@ export class RampsController { }; } else if ('type' in ramp.from && ramp.from.type === 'Prefunded') { paymentInstructions = undefined; + status = RampStatus.PROCESSING; } else if (ramp.type === OnRampProperties.type.ON_RAMP) { const transferMethod = getTransferMethod((ramp.from as FiatCapability)?.transferMethod); paymentInstructions = { @@ -170,7 +171,7 @@ export class RampsController { ...(paymentInstructions && { paymentInstructions }), createdAt: new Date().toISOString(), updatedAt: new Date().toISOString(), - status: RampStatus.PENDING, + status, fees: {}, expiresAt: new Date(Date.now() + 3 * 24 * 60 * 60 * 1000).toISOString(), // 3 days from now }; @@ -202,9 +203,9 @@ function getTransferMethod(transferMethod: FiatCapability['transferMethod']): Fi } } -function injectKnownAssetIdsToRampsAssetObjects( +function injectKnownAssetIdsToRampsMethods( knownAssetIds: string[], - repository: Repository | Repository + repository: Repository ) { for (const { id } of repository.list()) { const ramp = repository.find(id); @@ -221,3 +222,35 @@ function injectKnownAssetIdsToRampsAssetObjects( } } } + +function injectKnownAssetIdsToRamps(knownAssetIds: string[], repository: Repository) { + for (const { id } of repository.list()) { + const ramp = repository.find(id); + if (!ramp) { + throw new Error('Not possible!'); + } + + if ('assetId' in ramp.from.asset) { + ramp.from.asset.assetId = JSONSchemaFaker.random.pick(knownAssetIds); + } + if ('assetId' in ramp.to.asset) { + ramp.to.asset.assetId = JSONSchemaFaker.random.pick(knownAssetIds); + } + + if (ramp.estimatedFees) { + for (const fee of ramp.estimatedFees) { + if ('assetId' in fee.feeAsset) { + fee.feeAsset.assetId = JSONSchemaFaker.random.pick(knownAssetIds); + } + } + } + + if (ramp.receipt?.actualFees) { + for (const fee of ramp.receipt.actualFees) { + if ('assetId' in fee.feeAsset) { + fee.feeAsset.assetId = JSONSchemaFaker.random.pick(knownAssetIds); + } + } + } + } +} diff --git a/v2/api-validator/tests/self-tests/liquidity-controller.test.ts b/v2/api-validator/tests/self-tests/liquidity-controller.test.ts index 0aee0bae..92e435b8 100644 --- a/v2/api-validator/tests/self-tests/liquidity-controller.test.ts +++ b/v2/api-validator/tests/self-tests/liquidity-controller.test.ts @@ -13,6 +13,7 @@ describe('Liquidity Controller', () => { toAmount: defaultAmount, fromAsset: defaultAssetReference, toAsset: defaultAssetReference, + conversionFeeAsset: defaultAssetReference, conversionFeeBps: 1, createdAt: new Date(Date.now()).toISOString(), expiresAt: new Date(Date.now() + 1000).toISOString(), diff --git a/v2/api-validator/tests/server-tests/ramps.test.ts b/v2/api-validator/tests/server-tests/ramps.test.ts index abe3dc50..6e00e16c 100644 --- a/v2/api-validator/tests/server-tests/ramps.test.ts +++ b/v2/api-validator/tests/server-tests/ramps.test.ts @@ -34,6 +34,7 @@ import { PixCapability, EuropeanSEPACapability, LocalBankTransferCapability, + CryptocurrencySymbol, } from '../../src/client/generated'; import config from '../../src/config'; import { AssetsDirectory } from '../utils/assets-directory'; @@ -336,6 +337,16 @@ describe.skipIf(noRampsCapability)('Ramps', () => { for (const ramp of ramps) { expect(ramp.from.asset).toSatisfy(isKnownAsset); expect(ramp.to.asset).toSatisfy(isKnownAsset); + if (ramp.estimatedFees) { + for (const fee of ramp.estimatedFees) { + expect(fee.feeAsset).toSatisfy(isKnownAsset); + } + } + if (ramp.receipt?.actualFees) { + for (const fee of ramp.receipt.actualFees) { + expect(fee.feeAsset).toSatisfy(isKnownAsset); + } + } } } }); @@ -525,10 +536,11 @@ describe.skipIf(noRampsCapability)('Ramps', () => { expect(error.body.requestPart).toBe(RequestPart.BODY); }); - it('should fail when invalid transfer method is used', async () => { - const blockchainMethod: PublicBlockchainCapability = isBlockchainMethod(capability.from) - ? capability.from - : (capability.to as PublicBlockchainCapability); + it('should fail when invalid ramp method is used (asset to same asset', async () => { + const blockchainMethod: PublicBlockchainCapability = { + asset: { cryptocurrencySymbol: CryptocurrencySymbol.BTC }, + transferMethod: PublicBlockchainCapability.transferMethod.PUBLIC_BLOCKCHAIN, + }; const requestBody = rampRequestFromMethod({ from: blockchainMethod, to: blockchainMethod, diff --git a/v2/openapi/docs.html b/v2/openapi/docs.html new file mode 100644 index 00000000..2ece52f3 --- /dev/null +++ b/v2/openapi/docs.html @@ -0,0 +1,3795 @@ + + + + + + Fireblocks Provider Connectivity API v2 + + + + + + + + + +

Fireblocks Provider Connectivity API v2 (0.4.1)

Download OpenAPI specification:

Fireblocks Provider Connectivity API defines the interface for integration of third-party +providers into Fireblocks platform.

+

Introduction

Fireblocks connects businesses across the crypto world as the digital asset infrastructure +for over 1,800 leading trading desks, hedge funds, brokerages, custodians, 3rd parties, +and banks. To meet the demand for third-party services that want to access the liquidity +of institutional investors and traders, Fireblocks is opening its platform for fast +third-party integration. +As part of an initiative to make sure that the end user still has complete control over +their own assets, the provider can offer an Off Exchange solution. +This way, the end user can enjoy the various benefits of the exchange while avoiding the +risk of a centralized malfunction, all through the Fireblocks platform. +Reach out to us for a partnership agreement and add a Connector +to have your product integrated.

+

Further reading:

+ +

API Usage Guide

IDs

The API uses textual properties to identify its resources. These properties are called +id when they identify the parent resource. ID property names that are prepended by +a resource name point to some other resource; for example, assetId or accountId. +The IDs must uniquely identify each resource. Other than that the API does not require +the IDs to have any specific structure.

+

Idempotency

Servers implementing the API are expected to be +idempotent. That is, a client should be able +to safely retransmit the same request, being confident that the server will execute the +operation only once.

+

Request idempotence is achieved by adding idempotencyKey property to requests that +create or modify server resources. All retries of the same requests are sent containing +the same unique idempotency key. Clients will never reuse an idempotency key for other +requests.

+

When a server encounters a request with a previously used idempotency key, it should act +as follows:

+
    +
  • If the original request is different from the new one, despite having the same +idempotency key, the server should respond with HTTP status code 400 and response +body containing a JSON object with the following properties:
    {
    +  "message": "<Description of the error>",
    +  "errorType": "idempotency-key-reuse",
    +  "propertyName": "idempotencyKey",
    +  "requestPart": "body"
    +}
    +
    +
  • +
  • If the original request was handled with HTTP response status code 2xx or 4xx, +the server should return exactly the same response with exactly the same status code.
  • +
  • If the original request was handled with HTTP response status code 5xx, +the server should handle the new request and consider the new response as the original +response when handling any consecutive retries.
  • +
+

Servers are expected to recognize a retry for 72 hours, at least, since the last attempt.

+

Pagination

All API endpoint returning lists of entities use pagination to limit the number of items +returned in a response. The pagination is controlled by the following query parameters:

+ + + + + + + + + + + + + + + + + + + +
ParameterDescription
limitThe maximum number of items to return in a single response.
startingAfterItem ID. Instructs to return the items immediately following this object and not including it.
endingBeforeItem ID. Instructs to return the items immediately preceding this object and not including it.
+
    +
  • Notice that all the endpoints returning lists of items are defined to return an object +with a property containing the list.
  • +
  • If the requested query parameters result in an empty list, the server should still +return the defined object with the list property set to an empty array.
  • +
  • All the pagination query parameters are optional. If not provided, the server should +return the first page of items.
  • +
  • The returned dataset should never contain the item specified by the startingAfter or +endingBefore parameter.
  • +
  • endingBefore and startingAfter are mutually exclusive. If both are provided, the +server should respond with HTTP status code 400 and response body containing a JSON +object with the following properties:
    {
    +  "message": "Only one of the parameters 'startingAfter' and 'endingBefore' can be used.",
    +  "errorType": "invalid-query-parameters",
    +  "propertyName": "startingAfter",
    +  "requestPart": "query"
    +}
    +
    +
  • +
+

Capabilities

The API consists of separate optional components with flexible capabilities. Fireblocks +platform uses /capabilities/* endpoints to discovery dynamically the supported +components +and capabilities.

+

The discovery process starts with calling GET /capabilities. The response specifies +the implemented API version and an array of the supported API capabilities; for example, +this response indicates that all the capabilities are supported:

+
{
+  "version": "0.1.1",
+  "components": {
+    "accounts": "*",
+    "balances": "*",
+    "transfers": "*",
+    "transfersBlockchain": "*",
+    "transfersFiat": "*",
+    "transfersPeerAccounts": "*",
+    "trading": "*",
+    "liquidity": "*",
+    "ramps": "*"
+  }
+}
+
+

If a capability is supported only by a specific sub-account, the value of a capability +could +be replaced by a list of account IDs:

+
{
+  "version": "0.1.1",
+  "components": {
+    "accounts": "*",
+    "balances": "*",
+    "transfers": [
+      "6cd2fe1e-d0bc-4fad-a9ba-9384e0fdfdc0",
+      "7885a47b-0719-4448-b59e-3b8497cd1685"
+    ]
+  }
+}
+
+

Based on the response, Fireblocks platform will use the endpoints specific to each +component to discover the specific capabilities for each component.

+

Security

To ensure secure communication the protocol specifies several HTTP headers that must be +sent with each HTTP request:

+
    +
  • X-FBAPI-KEY - a secret token used to identify and authenticate the API caller.
  • +
  • X-FBAPI-TIMESTAMP - request creation UTC time, expressed in milliseconds since Unix +Epoch.
  • +
  • X-FBAPI-NONCE - request universal unique identifier (UUID).
  • +
  • X-FBAPI-SIGNATURE – request cryptographic signature, signed using the provider private key.
  • +
  • X-FB-PLATFORM-SIGNATURE - appears only in the Off-Exchange requests sent from Fireblocks; +contains request cryptographic signature, signed using Fireblocks private key.
  • +
+

Signature

+

HTTP request signature is calculated by applying a sequence of operations to the request +data. The cryptographic keys and the specific operations used by a server are defined +during the server on-boarding.

+

Building the message to sign

+

Build the message by concatenating the following parts of the request in this specific +order:

+
    +
  1. Timestamp — the request timestamp as it appears in X-FBAPI-TIMESTAMP header;
  2. +
  3. Nonce — the request nonce as it appears in X-FBAPI-NONCE header;
  4. +
  5. Method — the HTTP method of the request in upper case;
  6. +
  7. Endpoint — the request URL, including the query string, without prefixes;
  8. +
  9. Request body — the body of the HTTP request, when exists.
  10. +
+

For example, let's assume a client decides to get the first two balances of the account +with ID A1234. These are the request properties:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyValue
Timestamp1691606624184 (2023-08-09T18:43:44.184Z)
Noncec3d5f400-0e7e-4f94-a199-44b8cc7b6b81
MethodGET
Endpoint/accounts/A1234/balances?limit=2
Request bodyno request body for this request
+

The message to sign will +be: 1691606624184c3d5f400-0e7e-4f94-a199-44b8cc7b6b81GET/accounts/A1234/balances?limit=2

+

Computing the signature

+

The signature is computed by applying a pre-encoding function, a signing algorithm and +a post-encoding function to the message. A server can implement one of the several +supported options and specify the choice during the server on-boarding process. The same +signing method will be used for all the requests.

+

These are the supported algorithms:

+

Pre-encoding:

+
    +
  • URL encoded
  • +
  • Base64
  • +
  • HexStr
  • +
  • Base58
  • +
  • Base32
  • +
+

Post-encoding:

+
    +
  • Base64
  • +
  • HexStr
  • +
  • Base58
  • +
  • Base32
  • +
+

Notice that URL encoding is not supported for post-encoding.

+

Signing algorithms and possible hash functions:

+
    +
  • HMAC (SHA512, SHA3_256, or SHA256)
  • +
  • RSA PKCS1v15 (SHA512, SHA3_256, or SHA256)
  • +
  • ECDSA prime256v1/secp256k1 (SHA256 only)
  • +
+

Off-Exchange (Collateral) platform signature

+

Off-Exchange (Collateral) integration assumes bi-directional communication. All the requests, +sent as part of this integration, from Fireblocks to a provider's servers, contain an additional +header named X-FB-PLATFORM-SIGNATURE. This header contains the request signature signed with +Fireblocks private key. All providers are expected to validate this signature.

+ +

The signed message is built identically to the provider signature. +The signature itself is calculated by applying SHA512 pre-encoding function, applying RSA PKCS1v15 +signing algorithm, and finally applying base64 encoding to the result.

+

The signature verification usually consists of these steps:

+
    +
  1. Build the message, as described above.
  2. +
  3. Calculate the message hash by applying SHA512 to the message.
  4. +
  5. Get the value of the X-FB-PLATFORM-SIGNATURE header.
  6. +
  7. Base64 decode the value to get the actual signature.
  8. +
  9. Decrypt the signature using RSA PKCS1v15 and the +Fireblocks public key.
  10. +
  11. If the result is identical to the message hash, the signature is valid.
  12. +
+

Notice, that in many frameworks, some of these steps are combined into a single step.

+

Assets and transfer methods

An asset in Fireblocks Connectivity API is either a national currency +(per ISO-4217), one +of the blockchain native cryptocurrencies, explicitly listed in the API specification, or +an arbitrary blockchain token. A provider can choose to support test +versions of assets by setting testAsset flag in the capabilities response.

+

Any token used anywhere in the API must be listed in the response to GET /capabilities/assets. The returned object assigns a unique ID to each token. When an +asset +is used in a request or a response it is identified by its code/symbol, if it is an asset +predefined by the API specification; otherwise, it is identified by the aforementioned +unique ID.

+
+

National currencies and blockchain native currencies (e.g., BTC and ETH) can be +specified without listing them in /capabilities/assets.

+
+

Transfer methods define how assets are withdrawn and deposited. Each transfer method +starts as a capability. Given a capability, it can be used to define transfer addresses. +Finally, an address is used to make an actual transfer.

+

For example, calling GET /capabilities/transfers/withdrawals could return the following +object:

+
[
+  {
+    "balanceAsset": {
+      "coinType": "NationalCurrency",
+      "currencyCode": "USD"
+    },
+    "capability": {
+      "transferMethod": "PublicBlockchain",
+      "blockchain": "Ethereum",
+      "asset": {
+        "assetId": "a36c6daa-8ce9-4fd5-9b1d-5c33901a08e9"
+      }
+    }
+  }
+]
+
+

And GET /capabilities/assets return

+
[
+  {
+    "id": "a36c6daa-8ce9-4fd5-9b1d-5c33901a08e9",
+    "name": "Tether USD",
+    "symbol": "USDT",
+    "type": "Erc20Token",
+    "decimalPlaces": 6,
+    "blockchain": "Ethereum",
+    "decimalPlaces": 6,
+    "contractAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7"
+  }
+]
+
+

Combining the two responses together allows the client to understand that the server +supports withdrawal of USD balances as USDT over Ethereum blockchain.

+

In the next step, this capability could be used to define a specific withdrawal +destination:

+
{
+  "transferMethod": "PublicBlockchain",
+  "blockchain": "Ethereum",
+  "asset": {
+    "assetId": "a36c6daa-8ce9-4fd5-9b1d-5c33901a08e9"
+  },
+  "amount": "10",
+  "address": "0xEC52EC04b660a15B6C7A7C8C85f102B2C6cb2697",
+  "blockchainTxId": "0xb3b773aaf5929b2f94db973da8bb6f31b334cc57eaef872bd927119946067843"
+}
+
+

Notice, that in a deposit or a withdrawal operation the operation asset and the balance +asset are specified separately, thus enabling scenarios when assets appear as different +currencies when they "move".

+

Moreover, it is possible to define balances as arbitrary buckets, as long as there is a +clear definition which assets can be deposited and withdrawn from the bucket.

+

The same principles apply to fiat transfers. In general, asset transitions could be +described as follows:

+
    ┌───────────┐    ┌───────────┐    ┌──────────────┐    ┌───────────┐    ┌──────────────┐
+    │  Deposit  │    │  Balance  │    │              │    │  Balance  │    │  Withdrawal  │
+    │           ├───►│           ├───►│  Conversion  ├───►│           ├───►│              │
+    │  Asset 1  │    │  Asset 2  │    │              │    │  Asset 3  │    │   Asset 4    │
+    └───────────┘    └───────────┘    └──────────────┘    └───────────┘    └──────────────┘
+Example: MXN              MXN                                  USD               USDC
+
+

Transfer method definition in the API spec

+

Let's look in detail at how a transfer method is defined and used throughout the API. +All the transfer methods use the same pattern. We will take the IBAN transfer method +as an example.

+

There are four objects, extending one another, that define the IBAN transfer method:

+
    +
  1. IbanCapability – used to define that an asset can be transferred using IBAN. For +example, this object is returned by the withdrawal capabilities (getWithdrawalMethods) +and deposit capabilities (getDepositMethods) endpoints.
  2. +
  3. IbanAddress – extends IbanCapability and adds to it the IBAN address property and +account holder details. This object is used in deposit address management endpoints, +for example in createDepositAddress and getDepositAddresses.
  4. +
  5. IbanTransferDestination - extends IbanAddress and adds to it the amount property. +This object is used in for creation of fiat withdrawals (createFiatWithdrawal +endpoint). Notice how IbanAddress is not enough for withdrawals but is enough for +deposits, where the amount property is not needed.
  6. +
  7. IbanTransfer – used to describe existing fiat withdrawal, for example in +getFiatWithdrawals endpoint. It extends IbanTransferDestination and adds to it the +reference ID property to help correlate a withdrawal to a specific transaction on the +transaction recipient side.
  8. +
+

IBAN objects hierarchy

+

When a client retrieves a withdrawal details, an IbanTransfer object is returned in the +destination property; for example:

+
{
+  asset: {
+    // defined in IbanCapability
+    nationalCurrencyCode: "USD", // defined in NationalCurrency
+  },
+  transferMethod: "Iban", // defined in IbanCapability
+  iban: "GB33BUKB20201555555555", // defined in IbanAddress
+  accountHolder: {
+    // defined in IbanAddress
+    name: "Stephen Vincent Strange", // defined in AccountHolderDetails
+    city: "New York City", // defined in AccountHolderDetails
+    country: "USA", // defined in AccountHolderDetails
+    subdivision: "NY", // defined in AccountHolderDetails
+    address: "177A Bleecker Street", // defined in AccountHolderDetails
+    postalCode: "10012-1406", // defined in AccountHolderDetails
+  },
+  amount: "13.37", // defined in IbanTransferDestination
+  referenceId: "f9ff7738-92ea-48c8-8e80-68112d46f424", // defined in IbanTransfer
+}
+
+

Off-Exchange (Collateral)

Background

+

The purpose of the Fireblocks collateral account is to enable a middle ground for Traders and Exchanges where Traders assets are not stored in Exchange’s private ledger, yet the exchange get the comfort to lend against the collateral account assets, by having the collateral assets locked by Fireblocks, preventing the Trader from removing collateral assets without getting Exchange confirmation first.

+

Two-way integration

+

The collateral capability is a two-way integration between Fireblocks and the provider. +Fireblocks will send requests to the provider for most cases, but some actions or data fetch will be initiated by the provider.

+

The Fireblocks to Provider requests are described in this API specification. +The Provider to Fireblocks requests are listed below (refer to the Fireblocks API specification for the full details):

+
    +
  • GET /v1/collateral/transactions/{collateralTxId}
  • +
  • POST /v1/collateral/settlements
  • +
  • GET /v1/collateral/settlements/{settlementId}/transactions
  • +
  • GET /v1/collateral/address/{assetId}
  • +
  • PUT/GET/DELETE/POST /v1/collateral/settlements/force
  • +
  • POST /v1/collateral/signers/token
  • +
  • GET /v1/collateral/workspaces
  • +
  • GET /v1/collateral/signers/data
  • +
  • POST /v1/collateral/notify
  • +
+

Account structure and account linking (API key replace)

+

Fireblocks enables users to link their provider accounts to their workspace.

+

Once the account is connected, the user can at run the supported actions from the Fireblocks workspace.

+

For the collateral assets, Fireblocks will open a dedicated vault account which will be called Collateral Vault Account (CVA). +Any assets added to the CVA will be locked by the Fireblocks Policy and removing collateral assets from the CVA will require the provider’s confirmation.

+

Fireblocks users will be able to add collateral for main accounts only (MA).

+

There is a 1:1 relation between a CVA and a main account (MA).

+

The expected flow is for traders to add collateral for an MA, gain credit on their MA balance, and then allocate assets to the various MA sub-accounts.

+

The provider is expected to register a collateralId to an internal accountId and in case of an API key replacement, to respond to a CVA list request with the existing collateralId.

+

For settlements, traders would need to transfer assets up to the MA as settlements will be executed on the CVA and MA balances only.

+

Deposit/Withdraw Vs Remove/Add

+

The collateral functionality should apply to any main account of a customer that has enabled this functionality. +Meaning, once a customer is eligible and onboarded, all the existing main accounts of this customer should be enabled for gaining credit against CVA assets, while maintaining the usual deposit and withdrawal functionality.

+

We use the terms ‘add collateral’ and ‘remove collateral’ to distinguish between the CVA and the MA. For the MA, we keep referring with the usual deposit and withdraw terminology.

+

Please be aware that Fireblocks expect the deposits and withdrawals to and from the MA to remain active and available for CVA-linked MAs.

+

If a withdrawal from a MA is denied due to outstanding MA credit or customer-level credit, the provider is expected to respond with a ‘settlement is required’ status.

+

Post Address and Addresses list

+

As mentioned, FB will send a POST request each time a collateral is added via the FB system. +The request will include the address(es) to which the collateral assets are deposited. +The provider is expected to identify whether the address(es) are new and if so, add the new addresses to the CVA addresses list.

+

Balance types

+

Once a CVA is created for a MA, Fireblocks will start presenting Traders with 3 types of provider balance.

+
    +
  1. MA Total/Available balance.
  2. +
+
    +
  • This is the usual balance that is presented to non-CVA users as well.
  • +
+
    +
  1. MA credit balance.
  2. +
+
    +
  • This is a new type of balance, supplied to Fireblocks by the provider, and reflects the outstanding credit the MA gained from the provider treasury in accordance with the locked CVA assets.
  • +
  • The credit balance does not have to be equal to the CVA balance.
      +
    • For example, if Trader adds 100 BTC as collateral but provider decides to credit the MA with 40 BTC only, due to risk management considerations and Trader cross-accounts credit utilization, then the credit balance would be 40 BTC while 100 BTC are stored in the CVA.
        +
      • In this case, if Trader asks to remove the 60 BTC surplus from the CVA, provider should confirm this collateral removal.
      • +
      +
    • +
    +
  • +
+
    +
  1. MA collateral balance.
  2. +
+
    +
  • This is in fact the CVA balance which is being managed by Fiireblocks.
  • +
+

Capabilities and features

+

Initiation - we send Collateral ID and we want to get back a success with Collateral ID. If the API Key we use is of an account that already has a collateral ID, we want the success message to contain the existing collateral ID and we will not use the new one.

+

Network fees

+

Settlement transactions are on-chain transactions. provider should estimate future fees once crediting a Trader account relying on the CVA locked assets.

+

provider A may choose to credit 1:1 (e.g 1 BTC credit for each 1 BTC in CVA), but to ask for settlements earlier than provider B that chooses to credit 0.8:1 in order to keep aside an amount to cover settlement transactions’ network fees.

+

Gas

+

Settlements that involve gas-powered assets transferred from a CVA to an provider OTA, require the Trader to make sure there’s enough gas.

+

As a fallback, provider can deposit gas to the CVA by querying for the Ethereum address or any other base asset address.

+

At this time, Fireblocks will not manage gas stations for CVAs.

+

Collateral ID

+

The identifier of the CVA is called ‘collateral ID’ and is represented as a series of 3 uuid4 formats separated with a . delimiter.

+

Supported Assets

+

Fireblocks keeps a record of each provider supported assets. On each deposit into the CVA, Fireblocks sends a POST call to the provider with the address to which the asset is being deposited, the name of the asset and network as the provider defined them, and the unique fireblocksAssetId which the provider needs to track in order to communicate with Fireblocks about this asset.

+

Fireblocks will not allow users to add unsupported assets as collateral. A caveat to that rule is that a user may transfer funds to a CVA not via the Fireblocks UI/API. In that case, the provider would not get a POST ‘address’, and may ignore that deposit, not credit against it, and confirm its removal once asked for.

+

Assets that Fireblocks do not support cannot be included in settlements. +If a non-supported asset is at the MA and needs to settle, the provider wouldn't be able to include it in the settlement as there isn’t any Fireblocks Asset Id for assets that Fireblocks do not support.

+

Settlements

+

As settlement transactions are on-chain transactions, frequency based settlements are not recommended, to minimize network fees. Instead, the best practice for providers to trigger settlements would be based on the value difference between the CVA assets and the total provider account value (including unrealised P&L). +Traders may trigger settlements after spot trading where the value difference may be minimal, but for the provider-side settlement-logic, risk appetite for a specific

+

Auto-sign settlement transactions

+

The following description is for the available auto-sign mechanism for settlement transactions that customers do not respond to.

+

providers can choose to require some or all customers to create an API-based user in the Collaterals Workspace, for the provider to run on an provider owned and operated machine. This is a user from a Collaterals Signer role, which is limited, cannot fetch balances, cannot initiate transactions, but can sign some settlement transactions as described below.

+

If a customer does not sign and does not deny settlement transactions during the SLA that was defined by the provider for the customers to respond to settlement transactions, then at the end of this SLA time, these transactions which the customer did not sign nor deny, will be sent by Fireblocks to the provider Collaterals Signer user to be automatically signed.

+

No development is required, only operations of deploying and running a machine for the Collaterals Signer user to be online ready to sign transactions if needed.

+

Customers can create a Collaterals Signer user after getting a CSR from the provider.

+

If customers deny a settlement transaction, the denied transaction will not be sent to the Collaterals Signer for auto-sign.

+

Forced Settlement

+

For providers that want to prevent continuous ‘deny’ situations with customers, Fireblocks enables the Forced Settlement flow, which like the Auto-sign flow, requires the provider to run +a Collaterals Signer machine.

+

At the end of the Auto-sign SLA, if customers have denied some or all of the settlement transactions, the provider can mark the settlement as a Forced Settlement candidate. We strongly recommend the provider to contact the customer and get to an agreed upon settlement terms, Fireblocks will anyway alert the customer about any settlement that is being marked for enforcement.

+

Marking a settlement as a ​​Forced Settlement candidate means that all of the non-completed transactions that were part of the settlement ID will be enforced. Per-transaction marking is not supported, but a new settlement can be created if as a result of discussing with the customer, some of the transactions from the original settlement have changed.

+

The marking is done by sending a PUT request to Fireblocks settlements/force endpoint, and can be done for the last settlement only. A request to mark a settlement ID which is not the last settlement ID created, will be failed. +Once a settlement has been marked as a Forced Settlement candidate, no other settlement can be initiated before either the marking is canceled, or the Forced Settlement is completed. Only one settlement can be marked at a given time.

+

Once a settlement has been marked as a Forced Settlement candidate, Fireblocks stops Off-provider operations (Add collateral, Remove collateral, GET/POST Settlement request from the customer).

+

Canceling the marking is done by sending a DEL request to Fireblocks settlements/force endpoint.

+

An Enforcement SLA should be set by the provider and communicated to customers.

+

During the time between marking a settlement and forcing it at the end of the SLA, the provider can get information about a marked settlement by sending a GET request to Fireblocks settlements/force endpoint.

+

At the end of the Enforcement SLA, the provider can force all the non-completed transactions from the original settlement by sending a POST request to Fireblocks settlements/force endpoint. This request starts an asynchronous process. This request will not be answered before the following process ends. Once Fireblocks get the POST Force req, Fireblocks send a POST request to the provider on the settlements/force endpoint on the provider side, with a list of the transactions to be created. If the provider approves the transactions list, Fireblocks creates a new settlement ID, new transaction IDs, and those are included in the response to the POST request from the provider that started this asynchronous process.

+

We will enable providers to mark the last settlement ID for up to 7 days since the settlement ID creation.

+

We will enable providers to force a settlement for up to 10 days since the settlement ID creation.

+

NOTE: If a to-exchange settlement transaction has been cancelled, you will not be able to force that settlement.

+

Collateral Signer Creation Automation

+

To ensure a seamless onboarding process the off-exchange clients, we have developed an automation for creating the Collateral Signer user. +This user is created right after the creation of a collateral workspace that will hold the CVAs. +The creation process for the Collateral Signer user entails pairing it with a designated co-signer that runs on a Partner’s owned machine. +This pairing procedure utilizes a user pairing token, which can be pulled from Fireblocks. +Upon completion of the user creation process, Fireblocks will notify the Partner that a Collateral Signer user is ready, and its pairing token can be pulled. +Afterwards, the pairing token can be added as a new Collateral Signer user to the Partner’s Collateral Signer machine.

+

Diagrams

+

Setup

+

Setup

+

Deposit

+

Deposit

+

Withdrawal

+

Withdrawal

+

Settlement

+

Settlement

+

Collateral Signer Automation Flow

+

CSA

+

Forced Settlement

+

High-Level Flow Diagram

+

FlowForced

+

In-depth - Marking a settlement as a candidate for enforcement

+

FlowMarked

+

In-depth - Forcing a settlement

+

FlowInvoked

+

Operational Considerations

IP whitelisting

All API calls from Fireblocks to the provider service are sent from a fixed set of +IP addresses, grouped by geographical region. The provider should whitelist these +addresses to allow Fireblocks to access the provider servers.

+

Following are the IP addresses grouped by region:

+

Singapore

+
    +
  • 18.99.36.0
  • +
  • 18.99.36.1
  • +
  • 18.99.36.2
  • +
  • 18.99.36.3
  • +
  • 18.99.36.4
  • +
  • 18.99.36.5
  • +
  • 18.99.36.6
  • +
  • 18.99.36.7
  • +
  • 18.99.36.8
  • +
  • 18.99.36.9
  • +
  • 52.76.208.129
  • +
+

Europe

+
    +
  • 18.98.161.0
  • +
  • 18.98.161.1
  • +
  • 18.98.161.2
  • +
  • 18.98.161.3
  • +
  • 18.98.161.4
  • +
  • 18.98.161.5
  • +
  • 18.98.161.6
  • +
  • 18.98.161.7
  • +
  • 18.98.161.8
  • +
  • 18.98.161.9
  • +
  • 18.98.161.10
  • +
  • 18.98.161.11
  • +
  • 18.98.161.12
  • +
  • 18.98.161.13
  • +
  • 18.98.161.14
  • +
  • 18.98.161.15
  • +
  • 18.98.161.16
  • +
  • 18.98.161.17
  • +
  • 18.98.161.18
  • +
  • 18.98.161.19
  • +
  • 18.133.153.74
  • +
  • 3.10.68.107
  • +
  • 3.64.123.47
  • +
  • 18.158.242.74
  • +
  • 3.10.103.242
  • +
  • 3.67.233.15
  • +
+

USA

+
    +
  • 18.97.132.0
  • +
  • 18.97.132.1
  • +
  • 18.97.132.2
  • +
  • 18.97.132.3
  • +
  • 18.97.132.4
  • +
  • 18.97.132.5
  • +
  • 18.97.132.6
  • +
  • 18.97.132.7
  • +
  • 18.97.132.8
  • +
  • 18.97.132.9
  • +
  • 40.117.39.160
  • +
+

capabilities

Server capabilities discovery operations.

+

Describe server capabilities

Returns the API version and all the capabilities that the server supports.

+

The capabilities are specified as a map. The map keys are the capability names and the values are lists of account IDs. If all the accounts support a capability, an asterisk could be used, instead of listing all the accounts.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+

Responses

Response samples

Content type
application/json
Example
{
  • "version": "1.0.37",
  • "components": {
    }
}

Get list of supported additional assets

Returns assets, supported in addition to the predefined national currencies and the native cryptocurrencies.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+

Responses

Response samples

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

Get details of a supported additional asset.

Returns the details of an assets, supported in addition to the predefined national currencies and the native cryptocurrencies.

+
path Parameters
id
required
string

Entity unique identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+

Responses

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "name": "string",
  • "symbol": "string",
  • "description": "string",
  • "decimalPlaces": 0,
  • "testAsset": true,
  • "type": "BucketAsset"
}

List possible asset conversions

Retrieves the list of supported asset conversion pairs that can be quoted. Shows which assets can be converted to other assets through the liquidity service.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

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

List order books

Retrieves a list of all available trading order books supported by the provider. Each book represents a trading pair where users can place buy and sell orders.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

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

Get list of supported withdrawal methods

Retrieves the list of supported withdrawal methods available for the specified account. Shows which withdrawal types, networks, and destinations are supported for fund transfers.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json

This response indicates that all USD and USDC bucket balances could be withdrawn using the USDC tokens on the various blockchains. The USD balance can be specified directly while token and bucket balances must be defined in GET /capabilities/assets and referenced using their IDs. +The asset IDs in this example are the same IDs used in the examples of GET /capabilities/assets.

+
{
  • "capabilities": [
    ]
}

Get list of supported deposit methods

Retrieves the list of supported deposit methods available for the specified account. Shows which deposit types, networks, and sources are supported for fund transfers.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json

This response indicates that all USDC token on the various blockchains could be deposited either into the USDC bucket balance or into the USD balance. The USD balance can be specified directly while token and bucket balances must be defined in GET /capabilities/assets and referenced using their IDs. +The asset IDs in this example are the same IDs used in the examples of GET /capabilities/assets.

+
{
  • "capabilities": [
    ]
}

Get list of supported ramp methods

Retrieves the list of supported on-ramp and off-ramp methods available for the specified account. Shows which payment methods and currencies are supported for fiat-to-crypto and crypto-to-fiat conversions.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json

This response indicates that on ramp from USD to USDC, off ramp from USDC to USD and bridging between USDC and USDC on different blockchains are supported. The USD asset can be specified directly while tokens must be defined in GET /capabilities/assets and referenced using their IDs. +The asset IDs in this example are the same IDs used in the examples of GET /capabilities/assets.

+
{
  • "capabilities": [
    ]
}

accounts

User accounts management operations.

+

Get list of sub-accounts

Retrieves a paginated list of all sub-accounts available to the provider. Can optionally include balance information for each account if requested. Allows defining parent-child relationships between accounts. Notice that Fireblocks currently supports only one level of hierarchy.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
balances
boolean

Flag to include the account balances in the response. Balances are not returned by default for account endpoints.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+

Responses

Response samples

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

Get sub-account details

Retrieves detailed information about a specific sub-account, including account metadata and optionally balance information if requested.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
query Parameters
balances
boolean

Flag to include the account balances in the response. Balances are not returned by default for account endpoints.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "title": "string",
  • "description": "string",
  • "balances": [
    ],
  • "status": "active",
  • "parentId": "string"
}

balances

Balances management operations.

+

Get current balances

Retrieves current balance information for the specified account. Can be filtered by asset ID, national currency code, or cryptocurrency symbol.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
assetId
string

ID of one of the assets returned in get-additional-assets. Limits the response to one. Cannot be used in conjunction with cryptocurrencySymbol or nationalCurrencyCode

+
nationalCurrencyCode
string (NationalCurrencyCode)
Enum: "ADP" "AED" "AFA" "AFN" "ALK" "ALL" "AMD" "ANG" "AOA" "AOK" "AON" "AOR" "ARA" "ARP" "ARS" "ARY" "ATS" "AUD" "AWG" "AYM" "AZM" "BAD" "BAM" "BBD" "BDT" "BEC" "BEF" "BEL" "BGJ" "BGK" "BGL" "BGN" "BHD" "BIF" "BMD" "BND" "BOB" "BOP" "BOV" "BRB" "BRC" "BRE" "BRL" "BRN" "BRR" "BSD" "BTN" "BUK" "BWP" "BYB" "BYN" "BYR" "BZD" "CAD" "CDF" "CHC" "CHE" "CHF" "CHW" "CLF" "CLP" "CNY" "COP" "COU" "CRC" "CSD" "CSJ" "CSK" "CUC" "CUP" "CVE" "CYP" "CZK" "DDM" "DEM" "DJF" "DKK" "DOP" "DZD" "ECS" "ECV" "EEK" "EGP" "ERN" "ESA" "ESB" "ESP" "ETB" "EUR" "FIM" "FJD" "FKP" "FRF" "GBP" "GEK" "GEL" "GHC" "GHP" "GHS" "GIP" "GMD" "GNE" "GNF" "GNS" "GQE" "GRD" "GTQ" "GWE" "GWP" "GYD" "HKD" "HNL" "HRD" "HRK" "HTG" "HUF" "IDR" "IEP" "ILP" "ILR" "ILS" "INR" "IQD" "IRR" "ISJ" "ISK" "ITL" "JMD" "JOD" "JPY" "KES" "KGS" "KHR" "KMF" "KPW" "KRW" "KWD" "KYD" "KZT" "LAJ" "LAK" "LBP" "LKR" "LRD" "LSL" "LSM" "LTL" "LTT" "LUC" "LUF" "LUL" "LVL" "LVR" "LYD" "MAD" "MDL" "MGA" "MGF" "MKD" "MLF" "MMK" "MNT" "MOP" "MRO" "MRU" "MTL" "MTP" "MUR" "MVQ" "MVR" "MWK" "MXN" "MXP" "MXV" "MYR" "MZE" "MZM" "NAD" "NGN" "NIC" "NIO" "NLG" "NOK" "NPR" "NZD" "OMR" "PAB" "PEH" "PEI" "PEN" "PES" "PGK" "PHP" "PKR" "PLN" "PLZ" "PTE" "PYG" "QAR" "RHD" "ROK" "ROL" "RON" "RSD" "RUB" "RUR" "RWF" "SAR" "SBD" "SCR" "SDD" "SDG" "SDP" "SEK" "SGD" "SHP" "SIT" "SKK" "SLL" "SOS" "SRD" "SRG" "SSP" "STD" "STN" "SUR" "SVC" "SYP" "SZL" "THB" "TJR" "TJS" "TMM" "TMT" "TND" "TOP" "TPE" "TRL" "TRY" "TTD" "TWD" "TZS" "UAH" "UAK" "UGS" "UGW" "UGX" "USD" "USN" "USS" "UYI" "UYN" "UYP" "UYU" "UYW" "UZS" "VEB" "VEF" "VES" "VNC" "VND" "VUV" "WST" "XAF" "XCD" "XOF" "XPF" "XSU" "XTS" "XUA" "XXX" "YDD" "YER" "YUD" "YUM" "YUN" "ZAL" "ZAR" "ZMK" "ZMW" "ZRN" "ZRZ" "ZWC" "ZWD" "ZWL" "ZWN" "ZWR"

Limits the response to one asset with the provided NationalCurrencyCode Cannot be used in conjunction with cryptocurrencySymbol or assetId

+
cryptocurrencySymbol
string (CryptocurrencySymbol)
Enum: "ADA" "ALGO" "ARB" "ASTR" "ATOM" "AURORA" "AVAX" "AXL" "BASE" "BCH" "BCHA" "BITKUB" "BNB" "BSV" "BTC" "CANTO" "CELESTIA" "CELO" "CHZ" "CHZ2" "CTXC" "DASH" "DOGE" "DOT" "DYDX" "EOS" "ETC" "ETH" "ETHW" "EVMOS" "FLR" "FTM" "GLMR" "HBAR" "HT" "KAVA" "KSM" "LTC" "LUNA" "LUNA2" "MATIC" "MOVR" "NEAR" "OAS" "OPT" "OSMO" "PALM" "RON" "RSK" "SMR" "SOL" "SONGBIRD" "SXNETWORK" "TKX" "TRX" "VLX" "WEMIX" "XDB" "XDC" "XEC" "XEM" "XLM" "XRP" "XTZ" "ZEC"

Limits the response to one asset with the provided CryptocurrencySymbol Cannot be used in conjunction with nationalCurrencyCode or assetId

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+

Responses

Response samples

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

rates

Rates operations.

+

Get rate by account and assets

path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
query Parameters
conversionPairId
string

Conversion pair to get the rate for.

+
rampsPairId
string

Ramps pair to get the rate for.

+
orderBookPairId
string

Order book pair to get the rate for.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+

Responses

Response samples

Content type
application/json
Example
{
  • "rate": "0.9",
  • "timestamp": 1546658861000,
  • "baseAsset": {
    },
  • "quoteAsset": {
    }
}

liquidity

Liquidity operations

+

Quote creation request

Either fromAmount or toAmount must be specified, while the unspecified amount will be populated by the server and returned in the response.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
Request Body schema: application/json

Details of the quote request

+
One of
required
NationalCurrency (object) or NativeCryptocurrency (object) or OtherAssetReference (object) (AssetReference)
required
NationalCurrency (object) or NativeCryptocurrency (object) or OtherAssetReference (object) (AssetReference)
fromAmount
required
string (PositiveAmount) ^\d+(\.\d+)?

Responses

Request samples

Content type
application/json
{
  • "fromAsset": {
    },
  • "toAsset": {
    },
  • "toAmount": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "fromAsset": {
    },
  • "fromAmount": "string",
  • "toAsset": {
    },
  • "toAmount": "string",
  • "conversionFeeBps": 0,
  • "conversionFeeAsset": {
    },
  • "status": "ready",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "expiresAt": "2019-08-24T14:15:22Z"
}

Get list of quotes sorted by creation time

Retrieves a paginated list of all quotes for the specified account. Quotes are sorted by creation time and can be ordered ascending or descending.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
order
string
Default: "desc"
Enum: "asc" "desc"

Controls the order of the items in the returned list.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

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

Get quote details

Retrieves detailed information about a specific quote, including conversion rates, amounts, expiration time, and current status.

+
path Parameters
id
required
string

Entity unique identifier.

+
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "fromAsset": {
    },
  • "fromAmount": "string",
  • "toAsset": {
    },
  • "toAmount": "string",
  • "conversionFeeBps": 0,
  • "conversionFeeAsset": {
    },
  • "status": "ready",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "expiresAt": "2019-08-24T14:15:22Z"
}

Execute quote

Executes a previously created quote, performing the actual asset conversion. The quote must be valid and not expired for execution to succeed.

+
path Parameters
id
required
string

Entity unique identifier.

+
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "fromAsset": {
    },
  • "fromAmount": "string",
  • "toAsset": {
    },
  • "toAmount": "string",
  • "conversionFeeBps": 0,
  • "conversionFeeAsset": {
    },
  • "status": "ready",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "expiresAt": "2019-08-24T14:15:22Z"
}

trading

Order book trading operations.

+

Get details of an order book

Retrieves detailed information about a specific trading order book, including book metadata, trading pair details, and current status.

+
path Parameters
id
required
string

Entity unique identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json
Example
{
  • "id": "BTC/USDC",
  • "description": "Bitcoin book",
  • "baseAsset": {
    },
  • "quoteAsset": {
    }
}

Get active sell orders in an order book

List active sell orders in an order book, sorted ascending by the sell price. Each entry is sum of all the asks at the specific price point.

+
path Parameters
id
required
string

Entity unique identifier.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

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

Get active buy orders in an order book

List active buy orders in an order book, sorted descending by the buy price. Each entry is sum of all the bids at the specific price point.

+
path Parameters
id
required
string

Entity unique identifier.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

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

List trading orders

List trading orders sorted descending by the creation time.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

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

Create a new trading order

quoteAssetPrice must be specified for limit orders, but cannot be used in market orders.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
Request Body schema: application/json

Order details

+
One of
bookId
required
string

ID of the order book.

+
side
required
any (OrderSide)
Enum: "SELL" "BUY"
timeInForce
required
any (OrderTimeInForce)
Enum: "GOOD_TILL_CANCELED" "FILL_OR_KILL" "IMMEDIATE_OR_CANCEL"
baseAssetQuantity
required
string (PositiveAmount) ^\d+(\.\d+)?
orderType
required
any
Value: "LIMIT"
quoteAssetPrice
required
string (PositiveAmount) ^\d+(\.\d+)?
idempotencyKey
required
string

Responses

Request samples

Content type
application/json
Example
{
  • "idempotencyKey": "03449d61-0966-481e-b12c-df651451c258",
  • "bookId": "BTC_USDC",
  • "side": "SELL",
  • "orderType": "LIMIT",
  • "timeInForce": "GOOD_TILL_CANCELED",
  • "baseAssetQuantity": "10",
  • "quoteAssetPrice": "20000"
}

Response samples

Content type
application/json
{
  • "id": "cf091554-f2b8-4cea-9783-2a7e5065b549",
  • "status": "TRADING",
  • "bookId": "BTC_USDC",
  • "side": "SELL",
  • "orderType": "LIMIT",
  • "timeInForce": "GOOD_TILL_CANCELED",
  • "baseAssetQuantity": "10",
  • "quoteAssetPrice": "20000",
  • "createdAt": "2023-06-02T19:45:26.550Z"
}

Get trading order details

Retrieves detailed information about a specific trading order, including order status, filled amounts, prices, and execution history.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
id
required
string

Entity unique identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json
{
  • "bookId": "string",
  • "side": "SELL",
  • "timeInForce": "GOOD_TILL_CANCELED",
  • "baseAssetQuantity": "string",
  • "orderType": "MARKET",
  • "id": "string",
  • "status": "TRADING",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "finalizedAt": "2019-08-24T14:15:22Z",
  • "trades": [
    ]
}

Cancel an active trading order

Cancels an active trading order, removing it from the order book. Only orders in pending or partially filled status can be cancelled.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
id
required
string

Entity unique identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "errorType": "schema-error",
  • "propertyName": "/topLevelProperyName/childPropertyName/thirdLevelPropertyName",
  • "requestPart": "params"
}

transfers

Fund transfers management operations.

+

Get list of withdrawals sorted by creation time

Retrieves a paginated list of all withdrawal transactions for the specified account. Withdrawals are sorted by creation time and include all types of withdrawal operations.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
order
string
Default: "desc"
Enum: "asc" "desc"

Controls the order of the items in the returned list.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

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

Get withdrawal details

Retrieves detailed information about a specific withdrawal transaction, including status, amounts, fees, destination details, and processing information.

+
path Parameters
id
required
string

Entity unique identifier.

+
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "balanceAsset": {
    },
  • "balanceAmount": "string",
  • "status": "pending",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "finalizedAt": "2019-08-24T14:15:22Z",
  • "events": [
    ],
  • "destination": {
    }
}

Get list of deposits sorted by creation time in a descending order

Retrieves a paginated list of all deposit transactions for the specified account. Deposits are sorted by creation time in descending order and include all types of deposit operations.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

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

Get deposit details

Retrieves detailed information about a specific deposit transaction, including status, amounts, source details, confirmation information, and processing details.

+
path Parameters
id
required
string

Entity unique identifier.

+
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "balanceAsset": {
    },
  • "balanceAmount": "string",
  • "source": {
    },
  • "depositAddressId": "string",
  • "status": "pending",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "finalizedAt": "2019-08-24T14:15:22Z"
}

transfersBlockchain

Fund transfers over public blockchains.

+

Get list of withdrawals over public blockchains sorted by creation time

Retrieves a paginated list of withdrawal transactions sent over public blockchains. Includes cryptocurrency transfers to external blockchain addresses, sorted by creation time.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
order
string
Default: "desc"
Enum: "asc" "desc"

Controls the order of the items in the returned list.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

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

Create new withdrawal over public blockchain

Should reject any non blockchain withdrawal request.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
Request Body schema: application/json
required

Withdrawal details

+
idempotencyKey
required
string
balanceAmount
required
string (PositiveAmount) ^\d+(\.\d+)?
required
NationalCurrency (object) or NativeCryptocurrency (object) or OtherAssetReference (object) (AssetReference)
required
object (PublicBlockchainTransactionDestination)
object (ParticipantsIdentification)

An object that ensures the inclusion of either the originator or beneficiary details for transactions.

+

Responses

Request samples

Content type
application/json
{
  • "idempotencyKey": "string",
  • "balanceAmount": "string",
  • "balanceAsset": {
    },
  • "destination": {
    },
  • "participantsIdentification": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "balanceAsset": {
    },
  • "balanceAmount": "string",
  • "status": "pending",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "finalizedAt": "2019-08-24T14:15:22Z",
  • "events": [
    ],
  • "destination": {
    }
}

Create new deposit address

Creates a new deposit address for the specified account and asset. The generated address can be used to receive deposits for the specified cryptocurrency or token.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
Request Body schema: application/json
required

Deposit address details

+
idempotencyKey
required
string
required
PublicBlockchainCapability (object) or IbanCapability (object)

Responses

Request samples

Content type
application/json
{
  • "idempotencyKey": "string",
  • "transferMethod": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "destination": {
    },
  • "status": "enabled"
}

Get list of existing deposit addresses

Retrieves a paginated list of all deposit addresses associated with the specified account. Shows addresses for different cryptocurrencies and networks that can receive deposits.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

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

Get details of a deposit address

Retrieves detailed information about a specific deposit address, including the address string, associated network, asset type, and usage metadata.

+
path Parameters
id
required
string

Entity unique identifier.

+
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "destination": {
    },
  • "status": "enabled"
}

Disable a deposit address

Disables a specific deposit address, preventing it from receiving new deposits. Existing funds sent to the address may still be processed depending on timing and confirmation status.

+
path Parameters
id
required
string

Entity unique identifier.

+
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "errorType": "schema-error",
  • "propertyName": "/topLevelProperyName/childPropertyName/thirdLevelPropertyName",
  • "requestPart": "params"
}

transfersFiat

National currency fund transfers.

+

Get list of fiat withdrawals sorted by creation time

Retrieves a paginated list of fiat currency withdrawal transactions. Includes traditional banking transfers and wire transfers, sorted by creation time.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
order
string
Default: "desc"
Enum: "asc" "desc"

Controls the order of the items in the returned list.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

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

Create new fiat withdrawal

Should reject any non fiat withdrawal request.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
Request Body schema: application/json
required

Withdrawal details

+
idempotencyKey
required
string
balanceAmount
required
string (PositiveAmount) ^\d+(\.\d+)?
required
NationalCurrency (object) or NativeCryptocurrency (object) or OtherAssetReference (object) (AssetReference)
required
IbanAddress (object) (FiatTransferDestination)

Responses

Request samples

Content type
application/json
{
  • "idempotencyKey": "string",
  • "balanceAmount": "string",
  • "balanceAsset": {
    },
  • "destination": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "balanceAsset": {
    },
  • "balanceAmount": "string",
  • "status": "pending",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "finalizedAt": "2019-08-24T14:15:22Z",
  • "events": [
    ],
  • "destination": {
    }
}

Create new deposit address

Creates a new deposit address for the specified account and asset. The generated address can be used to receive deposits for the specified cryptocurrency or token.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
Request Body schema: application/json
required

Deposit address details

+
idempotencyKey
required
string
required
PublicBlockchainCapability (object) or IbanCapability (object)

Responses

Request samples

Content type
application/json
{
  • "idempotencyKey": "string",
  • "transferMethod": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "destination": {
    },
  • "status": "enabled"
}

Get list of existing deposit addresses

Retrieves a paginated list of all deposit addresses associated with the specified account. Shows addresses for different cryptocurrencies and networks that can receive deposits.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

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

Get details of a deposit address

Retrieves detailed information about a specific deposit address, including the address string, associated network, asset type, and usage metadata.

+
path Parameters
id
required
string

Entity unique identifier.

+
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "destination": {
    },
  • "status": "enabled"
}

Disable a deposit address

Disables a specific deposit address, preventing it from receiving new deposits. Existing funds sent to the address may still be processed depending on timing and confirmation status.

+
path Parameters
id
required
string

Entity unique identifier.

+
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "errorType": "schema-error",
  • "propertyName": "/topLevelProperyName/childPropertyName/thirdLevelPropertyName",
  • "requestPart": "params"
}

transfersPeerAccounts

Transfers to a peer account managed by the same provider.

+

Get list of withdrawals to peer accounts, sorted by creation time

Retrieves a paginated list of withdrawal transactions sent to peer accounts. Includes transfers to other accounts within the same provider ecosystem, sorted by creation time.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
order
string
Default: "desc"
Enum: "asc" "desc"

Controls the order of the items in the returned list.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

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

Create new withdrawal to a peer account

Should reject any non peer acount withdrawal request.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
Request Body schema: application/json
required

Withdrawal details

+
idempotencyKey
required
string
balanceAmount
required
string (PositiveAmount) ^\d+(\.\d+)?
required
NationalCurrency (object) or NativeCryptocurrency (object) or OtherAssetReference (object) (AssetReference)
required
object (PeerAccountTransferDestination)

Responses

Request samples

Content type
application/json
{
  • "idempotencyKey": "string",
  • "balanceAmount": "string",
  • "balanceAsset": {
    },
  • "destination": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "balanceAsset": {
    },
  • "balanceAmount": "string",
  • "status": "pending",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "finalizedAt": "2019-08-24T14:15:22Z",
  • "events": [
    ],
  • "destination": {
    }
}

transfersInternal

Transfers to a sub account in the same account.

+

Get list of withdrawals to sub-accounts, sorted by creation time

Retrieves a paginated list of internal withdrawal transactions between sub-accounts. Includes transfers within the same organization or account structure, sorted by creation time.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
order
string
Default: "desc"
Enum: "asc" "desc"

Controls the order of the items in the returned list.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

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

Create new transfer to another sub-account

Transfers assets between different sub-accounts of the same user. Should reject any withdrawals that are not sub-account transfers.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
Request Body schema: application/json
required

Withdrawal details

+
idempotencyKey
required
string
balanceAmount
required
string (PositiveAmount) ^\d+(\.\d+)?
required
NationalCurrency (object) or NativeCryptocurrency (object) or OtherAssetReference (object) (AssetReference)
required
object (InternalTransferDestination)

Responses

Request samples

Content type
application/json
{
  • "idempotencyKey": "string",
  • "balanceAmount": "string",
  • "balanceAsset": {
    },
  • "destination": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "balanceAsset": {
    },
  • "balanceAmount": "string",
  • "status": "pending",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "finalizedAt": "2019-08-24T14:15:22Z",
  • "events": [
    ],
  • "destination": {
    }
}

collateral

Collateral management operations.

+

Create/register a collateral deposit address for a specific asset

Notifies the provider to have a new collateral deposit address for a specific asset. The provider is expected to listen to this address and credit the account accordingly, or sending the funds to this address if a withdrawal is requested.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
collateralId
required
string

ID of a collateral account

+
header Parameters
X-FB-PLATFORM-SIGNATURE
required
string

Authentication signature of Fireblocks as the originator of the request

+
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
Request Body schema: application/json
required

Collateral deposit address details

+
required
object (PublicBlockchainAddress)
recoveryAccountId
required
string

An account ID used when recovering the assets of an off-exchange client

+

Responses

Request samples

Content type
application/json
{
  • "address": {
    },
  • "recoveryAccountId": "12"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "address": {
    },
  • "recoveryAccountId": "12"
}

Get list of collateral account deposit addresses

Retrieves all registered deposit addresses for the specified collateral account. Can be filtered by asset ID or cryptocurrency symbol to get addresses for specific assets.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
collateralId
required
string

ID of a collateral account

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
assetId
string

ID of one of the assets returned in get-additional-assets. Limits the response to one. Cannot be used in conjunction with cryptocurrencySymbol or nationalCurrencyCode

+
cryptocurrencySymbol
string (CryptocurrencySymbol)
Enum: "ADA" "ALGO" "ARB" "ASTR" "ATOM" "AURORA" "AVAX" "AXL" "BASE" "BCH" "BCHA" "BITKUB" "BNB" "BSV" "BTC" "CANTO" "CELESTIA" "CELO" "CHZ" "CHZ2" "CTXC" "DASH" "DOGE" "DOT" "DYDX" "EOS" "ETC" "ETH" "ETHW" "EVMOS" "FLR" "FTM" "GLMR" "HBAR" "HT" "KAVA" "KSM" "LTC" "LUNA" "LUNA2" "MATIC" "MOVR" "NEAR" "OAS" "OPT" "OSMO" "PALM" "RON" "RSK" "SMR" "SOL" "SONGBIRD" "SXNETWORK" "TKX" "TRX" "VLX" "WEMIX" "XDB" "XDC" "XEC" "XEM" "XLM" "XRP" "XTZ" "ZEC"

Limits the response to one asset with the provided CryptocurrencySymbol Cannot be used in conjunction with nationalCurrencyCode or assetId

+
header Parameters
X-FB-PLATFORM-SIGNATURE
required
string

Authentication signature of Fireblocks as the originator of the request

+
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

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

Get details of a specific deposit address in a collateral account.

Retrieves detailed information about a specific deposit address within a collateral account, including the address details and recovery account configuration.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
collateralId
required
string

ID of a collateral account

+
id
required
string

Entity unique identifier.

+
header Parameters
X-FB-PLATFORM-SIGNATURE
required
string

Authentication signature of Fireblocks as the originator of the request

+
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "address": {
    },
  • "recoveryAccountId": "12"
}

Preflight check before initiating a collateral deposit

Initiates a preflight request for a new collateral deposit transaction. The provider is notified, and Fireblocks waits for their approval before proceeding.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
collateralId
required
string

ID of a collateral account

+
header Parameters
X-FB-PLATFORM-SIGNATURE
required
string

Authentication signature of Fireblocks as the originator of the request

+
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
Request Body schema: application/json
required

Collateral deposit transaction preflight request details

+
required
NativeCryptocurrency (object) or OtherAssetReference (object) (CryptocurrencyReference)
amount
required
string (PositiveAmount) ^\d+(\.\d+)?
required
object (IntentApprovalRequest)

Responses

Request samples

Content type
application/json
{
  • "asset": {
    },
  • "amount": "string",
  • "intentApprovalRequest": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "Approved",
  • "asset": {
    },
  • "amount": "string",
  • "approvalRequest": {
    },
  • "rejectionReason": "string"
}

Register a collateral deposit transaction

Notifies the provider to have start listening to a new collateral deposit transaction. The provider is expected to listen to this address and credit the account accordingly

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
collateralId
required
string

ID of a collateral account

+
header Parameters
X-FB-PLATFORM-SIGNATURE
required
string

Authentication signature of Fireblocks as the originator of the request

+
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
Request Body schema: application/json
required

Collateral deposit transaction details

+
collateralTxId
required
string

A unique identifier of the transaction to track. This field will contain information to help the provider poll the status of the transaction from Fireblocks.

+
required
object (ApprovalRequest)

Approval request object.

+

Responses

Request samples

Content type
application/json
{
  • "collateralTxId": "0.8e4cfce8-0182-4c6d-b9dd-a291c105e1d2.0.5a814998-ec0f-4f1c-92bf-fb5f7dc09ea2",
  • "approvalRequest": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "Pending",
  • "collateralTxId": "0.8e4cfce8-0182-4c6d-b9dd-a291c105e1d2.0.5a814998-ec0f-4f1c-92bf-fb5f7dc09ea2",
  • "approvalRequest": {
    }
}

Get list of collateral account deposit transactions sorted by creation time

Retrieves a paginated list of all deposit transactions for the specified collateral account. Transactions are sorted by creation time and include status information and approval details.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
collateralId
required
string

ID of a collateral account

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
header Parameters
X-FB-PLATFORM-SIGNATURE
required
string

Authentication signature of Fireblocks as the originator of the request

+
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

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

Get a collateral account deposit transaction details

Retrieves detailed information about a specific collateral deposit transaction, including transaction status, approval details, and processing information.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
collateralId
required
string

ID of a collateral account

+
collateralTxId
required
string

A Fireblocks' ID of a collateral transaction

+
header Parameters
X-FB-PLATFORM-SIGNATURE
required
string

Authentication signature of Fireblocks as the originator of the request

+
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "Pending",
  • "collateralTxId": "0.8e4cfce8-0182-4c6d-b9dd-a291c105e1d2.0.5a814998-ec0f-4f1c-92bf-fb5f7dc09ea2",
  • "approvalRequest": {
    }
}

Preflight check before initiating a collateral withdrawal

Initiates a preflight request for a new collateral withdrawal transaction. The provider is notified, and Fireblocks waits for their approval before proceeding.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
collateralId
required
string

ID of a collateral account

+
header Parameters
X-FB-PLATFORM-SIGNATURE
required
string

Authentication signature of Fireblocks as the originator of the request

+
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
Request Body schema: application/json
required

Collateral withdrawal transaction preflight request details

+
amount
required
string (PositiveAmount) ^\d+(\.\d+)?
required
object (PublicBlockchainAddress)
required
object (IntentApprovalRequest)

Responses

Request samples

Content type
application/json
{
  • "amount": "string",
  • "destinationAddress": {
    },
  • "intentApprovalRequest": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "amount": "string",
  • "destinationAddress": {
    },
  • "approvalRequest": {
    },
  • "status": "Approved",
  • "rejectionReason": "string"
}

Notify of a withdrawal from a collateral account

Initiate a withdrawal from the customers collateral account. The withdrawal has been confirmed by the provider and signed by the customer. The amount can be reduced from the customers available balance in the provider main account based on the withdrawal amount.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
collateralId
required
string

ID of a collateral account

+
header Parameters
X-FB-PLATFORM-SIGNATURE
required
string

Authentication signature of Fireblocks as the originator of the request

+
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
Request Body schema: application/json
required

Collateral withdrawal transaction details

+
collateralTxId
required
string
required
object (ApprovalRequest)

Approval request object.

+
object (CollateralWithdrawalSettlementTransaction)

Represents a collateral withdrawal settlement transaction. Provide details about a withdrawal transaction in case of a settlement.

+

Responses

Request samples

Content type
application/json
{
  • "collateralTxId": "string",
  • "approvalRequest": {
    },
  • "settlementDetails": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "Pending",
  • "collateralTxId": "string",
  • "approvalRequest": {
    },
  • "rejectionReason": "string"
}

Get list of collateral withdrawal transactions sorted by creation time

Retrieves a paginated list of all withdrawal transactions for the specified collateral account. Transactions are sorted by creation time and include status, approval details, and settlement information.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
collateralId
required
string

ID of a collateral account

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
header Parameters
X-FB-PLATFORM-SIGNATURE
required
string

Authentication signature of Fireblocks as the originator of the request

+
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

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

Get a collateral withdrawal transaction details

Retrieves detailed information about a specific collateral withdrawal transaction, including transaction status, approval details, settlement information, and rejection reasons if applicable.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
collateralId
required
string

ID of a collateral account

+
collateralTxId
required
string

A Fireblocks' ID of a collateral transaction

+
header Parameters
X-FB-PLATFORM-SIGNATURE
required
string

Authentication signature of Fireblocks as the originator of the request

+
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "Pending",
  • "collateralTxId": "string",
  • "approvalRequest": {
    },
  • "rejectionReason": "string"
}

Initiate a settlement request from the provider

Request a settlement from the provider.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
collateralId
required
string

ID of a collateral account

+
header Parameters
X-FB-PLATFORM-SIGNATURE
required
string

Authentication signature of Fireblocks as the originator of the request

+
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
Request Body schema: application/json
required

Collateral withdrawal transaction details

+
settlementId
required
string
settlementVersion
required
string

A unique identifier of the settlement state version. This field is optional and can be used to indicate the version of the settlement state the client is referring to.

+

Responses

Request samples

Content type
application/json
{
  • "settlementId": "string",
  • "settlementVersion": "string"
}

Response samples

Content type
application/json
{
  • "settlementVersion": "string",
  • "withdrawInstructions": [
    ],
  • "depositInstructions": [
    ]
}

Get current Instructions for settlement

Gets a list of required transactions to finalize the settlement

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
collateralId
required
string

ID of a collateral account

+
header Parameters
X-FB-PLATFORM-SIGNATURE
required
string

Authentication signature of Fireblocks as the originator of the request

+
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json
{
  • "settlementVersion": "string",
  • "withdrawInstructions": [
    ],
  • "depositInstructions": [
    ]
}

Get a settlement details

Retrieves detailed information about a specific settlement state for a collateral account, including withdrawal and deposit transaction details, settlement status, and completion information.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
collateralId
required
string

ID of a collateral account

+
settlementVersion
required
string

A provider version ID of a settlement state

+
header Parameters
X-FB-PLATFORM-SIGNATURE
required
string

Authentication signature of Fireblocks as the originator of the request

+
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json
{
  • "settlementVersion": "string",
  • "withdrawTransactions": [
    ],
  • "depositTransactions": [
    ],
  • "status": "Invalid"
}

ramps

Beta Feature – Limited Access.

+

On-ramp, off-ramp and bridging operations.

+

Get list of ramps sorted by creation time

Retrieves a paginated list of all ramp transactions for the specified account. Ramps are sorted by creation time and include both on-ramp and off-ramp operations.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
query Parameters
limit
integer [ 1 .. 200 ]
Default: 10

Maximum number of returned items.

+
startingAfter
string

Object ID. Instructs to return the items immediately following this object and not including it. Cannot be used together with endingBefore.

+
endingBefore
string

Object ID. Instructs to return the items immediately preceding this object and not including it. Cannot be used together with startingAfter.

+
order
string
Default: "desc"
Enum: "asc" "desc"

Controls the order of the items in the returned list.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json

This response indicates that there are 3 ramps in the account.

+
{
  • "ramps": [
    ]
}

Initiates a new ramp

Creates the payment instructions for the new ramp and return it in the response.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+
Request Body schema: application/json
required

Ramp details

+
One of
idempotencyKey
required
string
amount
required
string (PositiveAmount) ^\d+(\.\d+)?
type
required
string
Value: "OnRamp"
required
IbanCapability (object) or AchCapability (object) or WireCapability (object) or SpeiCapability (object) or PixCapability (object) or EuropeanSEPACapability (object) or LocalBankTransferCapability (object) or MobileMoneyCapability (object) (FiatCapability)
required
object (PublicBlockchainAddress)
OrderQuote (object)
object (ParticipantsIdentification)

An object that ensures the inclusion of either the originator or beneficiary details for transactions.

+

Responses

Request samples

Content type
application/json
Example
{
  • "idempotencyKey": "string",
  • "amount": "string",
  • "type": "OnRamp",
  • "from": {
    },
  • "to": {
    },
  • "executionDetails": {
    },
  • "participantsIdentification": {
    }
}

Response samples

Content type
application/json
Example

A standard fiat to crypto on-ramp without additional features.

+
{
  • "id": "16b8b2c3-bd61-4745-9c48-3d30c2bc6907",
  • "createdAt": "2021-09-01T12:00:00Z",
  • "updatedAt": "2021-09-01T12:00:00Z",
  • "status": "Pending",
  • "amount": "1000.00",
  • "type": "OnRamp",
  • "expiresAt": "2021-09-01T12:00:00Z",
  • "from": {
    },
  • "to": {
    },
  • "paymentInstructions": {
    },
  • "estimatedFees": [
    ]
}

Get details of a specific ramp

Retrieves detailed information about a specific ramp transaction, including payment instructions, status, amounts, and processing details.

+
path Parameters
accountId
required
string^[A-Za-z0-9_-]+$

Sub-account identifier.

+
id
required
string

Entity unique identifier.

+
header Parameters
X-FBAPI-KEY
required
string

API authentication key.

+
X-FBAPI-NONCE
required
string

Unique identifier of the request.

+
X-FBAPI-SIGNATURE
required
string

Request signature using the chosen cryptographic algorithm. The signature is to be calculated on concatenation of the following request fields in the specified order:

+
    +
  • X-FBAPI-TIMESTAMP - X-FBAPI-NONCE - HTTP request method in upper case - Endpoint path, including the query parameters - Request body
  • +
+
X-FBAPI-TIMESTAMP
required
number

Request timestamp in milliseconds since Unix epoch.

+

Responses

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "status": "Pending",
  • "amount": "string",
  • "estimatedFees": [
    ],
  • "executionDetails": {
    },
  • "expiresAt": "2019-08-24T14:15:22Z",
  • "paymentInstructions": {
    },
  • "type": "OnRamp",
  • "from": {
    },
  • "to": {
    },
  • "receipt": {
    }
}
+ + + + diff --git a/v2/openapi/fb-provider-liquidity-api.yaml b/v2/openapi/fb-provider-liquidity-api.yaml index 6be3b93a..29c1ef34 100644 --- a/v2/openapi/fb-provider-liquidity-api.yaml +++ b/v2/openapi/fb-provider-liquidity-api.yaml @@ -287,6 +287,12 @@ components: conversionFeeBps: type: integer description: Conversion fee in basis points. The amounts are expected to include the fee. + conversionFeeAsset: + allOf: + - $ref: '#/x-schemas/AssetReference' + - description: > + This is the asset that will be used to pay the conversion fee. + If not returned, the asset will be the same as the fromAsset. status: $ref: '#/components/schemas/QuoteStatus' createdAt: diff --git a/v2/openapi/fb-provider-ramp-api.yaml b/v2/openapi/fb-provider-ramp-api.yaml index bcbdac2a..2284866b 100644 --- a/v2/openapi/fb-provider-ramp-api.yaml +++ b/v2/openapi/fb-provider-ramp-api.yaml @@ -71,6 +71,8 @@ x-schemas: { $ref: "./fb-provider-api.yaml#/components/schemas/CryptocurrencyReference", } + AssetReference: + { $ref: "./fb-provider-api.yaml#/components/schemas/AssetReference" } FiatAddress: { $ref: "./fb-provider-transfer-api.yaml#/components/schemas/FiatAddress" } IbanTransfer: @@ -84,11 +86,17 @@ x-schemas: PixTransfer: { $ref: "./fb-provider-transfer-api.yaml#/components/schemas/PixTransfer" } EuropeanSEPATransfer: - { $ref: "./fb-provider-transfer-api.yaml#/components/schemas/EuropeanSEPATransfer" } + { + $ref: "./fb-provider-transfer-api.yaml#/components/schemas/EuropeanSEPATransfer", + } MobileMoneyTransfer: - { $ref: "./fb-provider-transfer-api.yaml#/components/schemas/MobileMoneyTransfer" } + { + $ref: "./fb-provider-transfer-api.yaml#/components/schemas/MobileMoneyTransfer", + } LocalBankTransfer: - { $ref: "./fb-provider-transfer-api.yaml#/components/schemas/LocalBankTransfer" } + { + $ref: "./fb-provider-transfer-api.yaml#/components/schemas/LocalBankTransfer", + } PublicBlockchainTransaction: { $ref: "./fb-provider-transfer-api.yaml#/components/schemas/PublicBlockchainTransaction", @@ -317,9 +325,13 @@ components: name: "John Doe" address: "123 Main St, New York, NY 10001" iban: "US1234567890" - fees: - subAccount: 100 - provider: 200 + estimatedFees: + - feeType: "ORDER" + feeAsset: + nationalCurrencyCode: "USD" + fee: + amountType: "FIXED" + amount: "100.00" onRampWithQuote: summary: OnRamp with Quote description: An on-ramp that includes quote information for price execution. @@ -351,14 +363,18 @@ components: executionDetails: type: "Quote" quoteId: "quote-123456789" - reQuote: + reQuote: type: "Retry" slippage: 0.02 count: 3 - fees: - subAccount: 75 - provider: 150 - + estimatedFees: + - feeType: "ORDER" + feeAsset: + nationalCurrencyCode: "USD" + fee: + amountType: "FIXED" + amount: "100.00" + GetRampDetailsResponse: description: Ramp details. content: @@ -409,9 +425,13 @@ components: name: "John Doe" address: "123 Main St, New York, NY 10001" iban: "US1234567890" - fees: - subAccount: 100 - provider: 200 + estimatedFees: + - feeType: "ORDER" + feeAsset: + nationalCurrencyCode: "USD" + fee: + amountType: "FIXED" + amount: "100.00" expiresAt: "2021-09-01T12:00:00Z" - id: "69fa4f38-c1fd-4215-a310-82272225c4ef" createdAt: "2021-09-01T12:00:00Z" @@ -452,8 +472,13 @@ components: address: "123 Main St, New York, NY 10001" iban: "US1234567890" amount: "1231.45" - fees: - subAccount: 100 + actualFees: + - feeType: "ORDER" + feeAsset: + nationalCurrencyCode: "USD" + fee: + amountType: "FIXED" + amount: "100.00" expiresAt: "2021-09-01T12:00:00Z" - id: "afc7caa0-5b7e-4c98-8f2a-a037d0c6bbea" createdAt: "2021-09-01T12:00:00Z" @@ -484,14 +509,26 @@ components: assetId: "360de0ad-9ba1-45d5-8074-22453f193d65" # USDC on Ethereum transferMethod: "PublicBlockchain" receipt: + actualFees: + - feeType: "ORDER" + feeAsset: + nationalCurrencyCode: "USD" + fee: + amountType: "FIXED" + amount: "100.00" blockchainTxId: "0x1234567890abcdef1234567899abcdef1234567890abcdef1234567890abcdef" amount: "1231.45" address: "0x1234567890abcdef1234567890abcdef12345678" asset: assetId: "606bce6b-ff15-4704-9390-b9e32a6cfcff" # USDC on Polygon transferMethod: "PublicBlockchain" - fees: - subAccount: 100 + estimatedFees: + - feeType: "ORDER" + feeAsset: + nationalCurrencyCode: "USD" + fee: + amountType: "FIXED" + amount: "100.00" expiresAt: "2021-09-01T12:00:00Z" schemas: RampStatus: @@ -746,16 +783,67 @@ components: participantsIdentification: $ref: "#/x-schemas/ParticipantsIdentification" - RampFees: + FixedFeeAmount: type: object - description: Fees associated with the ramp transfer. + required: + - amountType + - amount properties: - subAccount: - type: integer - description: Fees charged from the sub-account in basis points. - provider: - type: integer - description: Fees charged by the provider for the ramp service in basis points. + amountType: + type: string + enum: + - FIXED + amount: + $ref: "#/x-schemas/PositiveAmount" + + BasisPointsFeeAmount: + type: object + required: + - amountType + - amount + properties: + amountType: + type: string + enum: + - BASIS_POINTS + amount: + type: number + description: Basis points (bps) - 1 is 0.01% and 10000 is 100% + + FeeAmount: + oneOf: + - $ref: "#/components/schemas/FixedFeeAmount" + - $ref: "#/components/schemas/BasisPointsFeeAmount" + + Fee: + type: object + required: + - feeType + - feeAsset + - fee + properties: + feeType: + type: string + description: > + Specifies the category of fee applied to the transaction. + - ORDER - Fee charged by the platform for executing the trade. + - NETWORK - Blockchain network fee paid to validators/miners. + - SPREAD - Implicit cost built into the price difference between quotes. + - REBATE - Negative fee returned to the user as a reward or incentive. + enum: + - ORDER + - NETWORK + - SPREAD + - REBATE + feeAsset: + $ref: "#/x-schemas/AssetReference" + fee: + $ref: "#/components/schemas/FeeAmount" + + RampFees: + type: array + items: + $ref: "#/components/schemas/Fee" CommonRamp: type: object @@ -773,7 +861,7 @@ components: $ref: "#/components/schemas/RampStatus" amount: $ref: "#/x-schemas/PositiveAmount" - fees: + estimatedFees: $ref: "#/components/schemas/RampFees" executionDetails: oneOf: @@ -824,6 +912,30 @@ components: $ref: "#/x-schemas/PublicBlockchainAddress" - $ref: "#/components/schemas/BridgeProperties" + OnRampReceipt: + allOf: + - $ref: "#/x-schemas/PublicBlockchainTransaction" + - type: object + properties: + actualFees: + $ref: "#/components/schemas/RampFees" + + OffRampReceipt: + allOf: + - $ref: "#/components/schemas/RampFiatTransfer" + - type: object + properties: + actualFees: + $ref: "#/components/schemas/RampFees" + + BridgeReceipt: + allOf: + - $ref: "#/x-schemas/PublicBlockchainTransaction" + - type: object + properties: + actualFees: + $ref: "#/components/schemas/RampFees" + OnRamp: title: On Ramp allOf: @@ -834,7 +946,7 @@ components: - type: object properties: receipt: - $ref: "#/x-schemas/PublicBlockchainTransaction" + $ref: "#/components/schemas/OnRampReceipt" OffRamp: allOf: @@ -845,7 +957,7 @@ components: - type: object properties: receipt: - $ref: "#/components/schemas/RampFiatTransfer" + $ref: "#/components/schemas/OffRampReceipt" Bridge: allOf: @@ -856,7 +968,7 @@ components: - type: object properties: receipt: - $ref: "#/x-schemas/PublicBlockchainTransaction" + $ref: "#/components/schemas/BridgeReceipt" Ramp: oneOf: @@ -917,4 +1029,4 @@ components: type: type: string enum: - - Market \ No newline at end of file + - Market diff --git a/v2/openapi/fb-provider-transfer-api.yaml b/v2/openapi/fb-provider-transfer-api.yaml index 9b3b65ff..aba19d13 100644 --- a/v2/openapi/fb-provider-transfer-api.yaml +++ b/v2/openapi/fb-provider-transfer-api.yaml @@ -910,7 +910,7 @@ components: - amount properties: amount: - $ref: '#/components/schemas/PositiveAmount' + $ref: '#/x-schemas/PositiveAmount' AchTransfer: allOf: @@ -957,7 +957,7 @@ components: - amount properties: amount: - $ref: '#/components/schemas/PositiveAmount' + $ref: '#/x-schemas/PositiveAmount' WireTransfer: allOf: @@ -1011,7 +1011,7 @@ components: - amount properties: amount: - $ref: '#/components/schemas/PositiveAmount' + $ref: '#/x-schemas/PositiveAmount' SpeiTransfer: allOf: @@ -1066,7 +1066,7 @@ components: - amount properties: amount: - $ref: '#/components/schemas/PositiveAmount' + $ref: '#/x-schemas/PositiveAmount' PixTransfer: allOf: @@ -1123,7 +1123,7 @@ components: - amount properties: amount: - $ref: '#/components/schemas/PositiveAmount' + $ref: '#/x-schemas/PositiveAmount' EuropeanSEPATransfer: allOf: @@ -1186,7 +1186,7 @@ components: - amount properties: amount: - $ref: '#/components/schemas/PositiveAmount' + $ref: '#/x-schemas/PositiveAmount' MobileMoneyTransfer: allOf: @@ -1237,7 +1237,7 @@ components: - amount properties: amount: - $ref: '#/components/schemas/PositiveAmount' + $ref: '#/x-schemas/PositiveAmount' LocalBankTransfer: allOf: diff --git a/v2/openapi/fb-unified-openapi.yaml b/v2/openapi/fb-unified-openapi.yaml index 4d903011..014d709e 100644 --- a/v2/openapi/fb-unified-openapi.yaml +++ b/v2/openapi/fb-unified-openapi.yaml @@ -2753,9 +2753,13 @@ components: name: John Doe address: 123 Main St, New York, NY 10001 iban: US1234567890 - fees: - subAccount: 100 - provider: 200 + estimatedFees: + - feeType: ORDER + feeAsset: + nationalCurrencyCode: USD + fee: + amountType: FIXED + amount: '100.00' onRampWithQuote: summary: OnRamp with Quote description: An on-ramp that includes quote information for price execution. @@ -2791,9 +2795,13 @@ components: type: Retry slippage: 0.02 count: 3 - fees: - subAccount: 75 - provider: 150 + estimatedFees: + - feeType: ORDER + feeAsset: + nationalCurrencyCode: USD + fee: + amountType: FIXED + amount: '100.00' GetRampDetailsResponse: description: Ramp details. content: @@ -2843,9 +2851,13 @@ components: name: John Doe address: 123 Main St, New York, NY 10001 iban: US1234567890 - fees: - subAccount: 100 - provider: 200 + estimatedFees: + - feeType: ORDER + feeAsset: + nationalCurrencyCode: USD + fee: + amountType: FIXED + amount: '100.00' expiresAt: '2021-09-01T12:00:00Z' - id: 69fa4f38-c1fd-4215-a310-82272225c4ef createdAt: '2021-09-01T12:00:00Z' @@ -2886,8 +2898,13 @@ components: address: 123 Main St, New York, NY 10001 iban: US1234567890 amount: '1231.45' - fees: - subAccount: 100 + actualFees: + - feeType: ORDER + feeAsset: + nationalCurrencyCode: USD + fee: + amountType: FIXED + amount: '100.00' expiresAt: '2021-09-01T12:00:00Z' - id: afc7caa0-5b7e-4c98-8f2a-a037d0c6bbea createdAt: '2021-09-01T12:00:00Z' @@ -2918,14 +2935,26 @@ components: assetId: 360de0ad-9ba1-45d5-8074-22453f193d65 transferMethod: PublicBlockchain receipt: + actualFees: + - feeType: ORDER + feeAsset: + nationalCurrencyCode: USD + fee: + amountType: FIXED + amount: '100.00' blockchainTxId: '0x1234567890abcdef1234567899abcdef1234567890abcdef1234567890abcdef' amount: '1231.45' address: '0x1234567890abcdef1234567890abcdef12345678' asset: assetId: 606bce6b-ff15-4704-9390-b9e32a6cfcff transferMethod: PublicBlockchain - fees: - subAccount: 100 + estimatedFees: + - feeType: ORDER + feeAsset: + nationalCurrencyCode: USD + fee: + amountType: FIXED + amount: '100.00' expiresAt: '2021-09-01T12:00:00Z' schemas: GeneralError: @@ -3851,6 +3880,11 @@ components: conversionFeeBps: type: integer description: Conversion fee in basis points. The amounts are expected to include the fee. + conversionFeeAsset: + allOf: + - $ref: '#/components/schemas/AssetReference' + - description: | + This is the asset that will be used to pay the conversion fee. If not returned, the asset will be the same as the fromAsset. status: $ref: '#/components/schemas/QuoteStatus' createdAt: @@ -5897,16 +5931,59 @@ components: properties: participantsIdentification: $ref: '#/components/schemas/ParticipantsIdentification' - RampFees: + FixedFeeAmount: type: object - description: Fees associated with the ramp transfer. + required: + - amountType + - amount properties: - subAccount: - type: integer - description: Fees charged from the sub-account in basis points. - provider: - type: integer - description: Fees charged by the provider for the ramp service in basis points. + amountType: + type: string + enum: + - FIXED + amount: + $ref: '#/components/schemas/PositiveAmount' + BasisPointsFeeAmount: + type: object + required: + - amountType + - amount + properties: + amountType: + type: string + enum: + - BASIS_POINTS + amount: + type: number + description: Basis points (bps) - 1 is 0.01% and 10000 is 100% + FeeAmount: + oneOf: + - $ref: '#/components/schemas/FixedFeeAmount' + - $ref: '#/components/schemas/BasisPointsFeeAmount' + Fee: + type: object + required: + - feeType + - feeAsset + - fee + properties: + feeType: + type: string + description: | + Specifies the category of fee applied to the transaction. - ORDER - Fee charged by the platform for executing the trade. - NETWORK - Blockchain network fee paid to validators/miners. - SPREAD - Implicit cost built into the price difference between quotes. - REBATE - Negative fee returned to the user as a reward or incentive. + enum: + - ORDER + - NETWORK + - SPREAD + - REBATE + feeAsset: + $ref: '#/components/schemas/AssetReference' + fee: + $ref: '#/components/schemas/FeeAmount' + RampFees: + type: array + items: + $ref: '#/components/schemas/Fee' CommonRamp: type: object required: @@ -5929,7 +6006,7 @@ components: $ref: '#/components/schemas/RampStatus' amount: $ref: '#/components/schemas/PositiveAmount' - fees: + estimatedFees: $ref: '#/components/schemas/RampFees' executionDetails: oneOf: @@ -5976,6 +6053,27 @@ components: paymentInstructions: $ref: '#/components/schemas/PublicBlockchainAddress' - $ref: '#/components/schemas/BridgeProperties' + OnRampReceipt: + allOf: + - $ref: '#/components/schemas/PublicBlockchainTransaction' + - type: object + properties: + actualFees: + $ref: '#/components/schemas/RampFees' + OffRampReceipt: + allOf: + - $ref: '#/components/schemas/RampFiatTransfer' + - type: object + properties: + actualFees: + $ref: '#/components/schemas/RampFees' + BridgeReceipt: + allOf: + - $ref: '#/components/schemas/PublicBlockchainTransaction' + - type: object + properties: + actualFees: + $ref: '#/components/schemas/RampFees' OnRamp: title: On Ramp allOf: @@ -5986,7 +6084,7 @@ components: - type: object properties: receipt: - $ref: '#/components/schemas/PublicBlockchainTransaction' + $ref: '#/components/schemas/OnRampReceipt' OffRamp: allOf: - $ref: '#/components/schemas/CommonRamp' @@ -5996,7 +6094,7 @@ components: - type: object properties: receipt: - $ref: '#/components/schemas/RampFiatTransfer' + $ref: '#/components/schemas/OffRampReceipt' Bridge: allOf: - $ref: '#/components/schemas/CommonRamp' @@ -6006,7 +6104,7 @@ components: - type: object properties: receipt: - $ref: '#/components/schemas/PublicBlockchainTransaction' + $ref: '#/components/schemas/BridgeReceipt' Ramp: oneOf: - $ref: '#/components/schemas/OnRamp'