All URIs are relative to https://developers.fireblocks.com/reference/
| Method | HTTP request | Description |
|---|---|---|
| addOffExchange | POST /off_exchange/add | Add Collateral |
| getOffExchangeCollateralAccounts | GET /off_exchange/collateral_accounts/{mainExchangeAccountId} | Find a specific collateral exchange account |
| getOffExchangeSettlementTransactions | GET /off_exchange/settlements/transactions | Get Settlements Transactions |
| removeOffExchange | POST /off_exchange/remove | Remove Collateral |
| settleOffExchangeTrades | POST /off_exchange/settlements/trader | Create Settlement for a Trader |
CreateTransactionResponse addOffExchange()
Add collateral and create deposit request. Learn more about Fireblocks Off Exchange in the following guide.
Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, OffExchangesApiAddOffExchangeRequest, CreateTransactionResponse } from '@fireblocks/ts-sdk';
// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");
const fireblocks = new Fireblocks();
let body: OffExchangesApiAddOffExchangeRequest = {
// AddCollateralRequestBody (optional)
addCollateralRequestBody: param_value,
// string | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional)
idempotencyKey: idempotencyKey_example,
};
fireblocks.offExchanges.addOffExchange(body).then((res: FireblocksResponse<CreateTransactionResponse>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| addCollateralRequestBody | AddCollateralRequestBody | ||
| idempotencyKey | [string] | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | (optional) defaults to undefined |
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A transaction object | - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ExchangeAccount getOffExchangeCollateralAccounts()
Returns a collateral account by mainExchangeAccountId. Learn more about Fireblocks Off Exchange in the following guide.
Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, OffExchangesApiGetOffExchangeCollateralAccountsRequest, ExchangeAccount } from '@fireblocks/ts-sdk';
// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");
const fireblocks = new Fireblocks();
let body: OffExchangesApiGetOffExchangeCollateralAccountsRequest = {
// string | The id of the main exchange account for which the requested collateral account is associated with
mainExchangeAccountId: mainExchangeAccountId_example,
};
fireblocks.offExchanges.getOffExchangeCollateralAccounts(body).then((res: FireblocksResponse<ExchangeAccount>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| mainExchangeAccountId | [string] | The id of the main exchange account for which the requested collateral account is associated with | defaults to undefined |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | An ExchangeAccount object | * X-Request-ID - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ExchangeSettlementTransactionsResponse getOffExchangeSettlementTransactions()
Get settlements transactions from exchange. Learn more about Fireblocks Off Exchange in the following guide.
Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, OffExchangesApiGetOffExchangeSettlementTransactionsRequest, ExchangeSettlementTransactionsResponse } from '@fireblocks/ts-sdk';
// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");
const fireblocks = new Fireblocks();
let body: OffExchangesApiGetOffExchangeSettlementTransactionsRequest = {
// string
mainExchangeAccountId: mainExchangeAccountId_example,
};
fireblocks.offExchanges.getOffExchangeSettlementTransactions(body).then((res: FireblocksResponse<ExchangeSettlementTransactionsResponse>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| mainExchangeAccountId | [string] | defaults to undefined |
ExchangeSettlementTransactionsResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A settlement transactions | - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateTransactionResponse removeOffExchange()
Remove collateral, create withdraw request. Learn more about Fireblocks Off Exchange in the following guide.
Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, OffExchangesApiRemoveOffExchangeRequest, CreateTransactionResponse } from '@fireblocks/ts-sdk';
// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");
const fireblocks = new Fireblocks();
let body: OffExchangesApiRemoveOffExchangeRequest = {
// RemoveCollateralRequestBody (optional)
removeCollateralRequestBody: param_value,
// string | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional)
idempotencyKey: idempotencyKey_example,
};
fireblocks.offExchanges.removeOffExchange(body).then((res: FireblocksResponse<CreateTransactionResponse>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| removeCollateralRequestBody | RemoveCollateralRequestBody | ||
| idempotencyKey | [string] | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | (optional) defaults to undefined |
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A transaction object | - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SettlementResponse settleOffExchangeTrades()
Create settlement for a trader. Learn more about Fireblocks Off Exchange in the following guide.
Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, OffExchangesApiSettleOffExchangeTradesRequest, SettlementResponse } from '@fireblocks/ts-sdk';
// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");
const fireblocks = new Fireblocks();
let body: OffExchangesApiSettleOffExchangeTradesRequest = {
// SettlementRequestBody (optional)
settlementRequestBody: param_value,
// string | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional)
idempotencyKey: idempotencyKey_example,
};
fireblocks.offExchanges.settleOffExchangeTrades(body).then((res: FireblocksResponse<SettlementResponse>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| settlementRequestBody | SettlementRequestBody | ||
| idempotencyKey | [string] | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | (optional) defaults to undefined |
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | A settlement object | - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]