Foxbit REST API (3.0)

Download OpenAPI specification:

Follow our Status Page for real-time updates on system performance and maintenance schedules.

Introduction

Welcome to the Foxbit Partners API documentation!

This is an extension of Foxbit's REST v3 API, created to meet the needs of our business partners.

The APIs presented here require special permissions, so please contact your account manager to obtain access.

If you don't find what you are looking for here, it may be covered by the public documentation ↗, and common questions are answered in the Foxbit Business FAQ ↗.

Guides and reference

This documentation is split into task-oriented guides (the correct order of calls for a product) and the API reference (the individual endpoints grouped by product). If you are integrating a product for the first time, start with its guide:

See all available APIs

First steps

Integration models

Before choosing where to start, check which parts of the API need a sub-member (an end customer you register under your partner account). Every endpoint carries a badge: Sub-member management (inside Sub-members), Requires sub-member or No sub-member needed.

Section Needs a sub-member? What it means
Sub-members Manages them Where you register and manage sub-members: registration and KYC, accounts, deposits, withdrawals and transfers. Endpoints marked Requires sub-member elsewhere act on one created here.
Trading All endpoints Every endpoint acts on behalf of an existing sub-member (sub_member_sn in the path); create one in Registration.
Portfolio Some endpoints Listing strategies and their performance needs no sub-member; portfolio accounts, plans, execution and statements act on an existing sub-member; create one in Registration.
Earn All endpoints Every endpoint acts on behalf of an existing sub-member (sub_member_sn in the path); create one in Registration.
Remittances All endpoints Every endpoint acts on behalf of an existing sub-member (sub_member_sn in the path); create one in Registration.
Fiat Gateway Some endpoints Markets, limits, quotes and orders need no sub-member; a sell quote accepts an optional sub_member_sn to answer the withdraw fee and the net amount; the user routes (/fiat_gateway/users/{sn}) act on a Fiat Gateway user, which is a sub-member of your account whose sub_member_sn is the sn; create one in Registration.
RFQ Some endpoints Markets and quotes need no sub-member; executing a quote (POST /rfq/quotes/execute) requires the sub_member_sn that executes it, in the request body; create one in Registration.
Blocktrade Some endpoints Listing and simulating quotes need no sub-member; creating, executing and looking up a quote act on an existing sub-member (sub_member_sn in the path); create one in Registration.
Payments No These endpoints act on your partner account directly; no sub-member is involved.
Prediction Markets No These endpoints act on your partner account directly; no sub-member is involved.
Partner account No These endpoints act on your partner account directly; no sub-member is involved.

The essentials to start calling the partner API. Most of these follow the public API — the ↗ links open the canonical reference in the public API docs.

Topic Reference
Creating API keys & permissions Creating API Keys
Authentication (request signing: HMAC or Ed25519) Authentication ↗
Rate limit Rate Limit ↗
Idempotency (safe retries with X-Idempotent) Idempotent Requests ↗
Error codes API Codes ↗
Signing multipart uploads (KYC documents, X-FB-CONTENT-SHA256) Submit sub-member documents

Creating API Keys

Create API keys on the Foxbit platform (Settings → API Key) with two-factor authentication (2FA) enabled. Partner APIs additionally require special permissions — ask your account manager. For the request-signing steps, see Authentication in the public API docs ↗.

For help with 2FA and key creation, see the Foxbit help center ↗.

Permissions
Permission Description
Read Grants read-only access to your account data.
Deposit Allows creating fiat and cryptocurrency deposits for your account and your sub-members.
Withdrawal Allows creating fiat and cryptocurrency withdrawals for your account and your sub-members (requires level evaluation and a special permission for cryptocurrencies).
Trade Allows placing buy and sell orders on the Foxbit platform.
Mutual TLS (mTLS)

mTLS is optional and off by default. It applies only once Foxbit has registered a client certificate for your account — ask your account manager. While a certificate is registered, every request signed with one of your API keys must be made over a TLS connection that presents it, to the hostname Foxbit provides for mTLS.

A request that presents no certificate, or one that is not the certificate registered for your account, is refused with 401 and code 2011. Session and OAuth bearer requests are not affected.

Renew before the expiry date. An expired certificate does not lift the requirement: the account keeps requiring mTLS and the expired certificate stops being accepted, so requests are refused until a new one is registered. Request the replacement ahead of the date.

Sandbox and testing

Foxbit provides a homologation (sandbox) environment so you can integrate and test before going live. The sandbox base URL and access are arranged with your account manager — your partner account must be explicitly enabled for the environment before you can authenticate or open the KYC flow.

What behaves differently in sandbox

  • KYC is released manually by Foxbit. The sandbox does not run the automatic verification provider — sub-member KYC is approved manually by the Foxbit team on request. Do not expect the production automated liveness/document verification flow to auto-complete here.
  • Order book liquidity is limited. Test markets may have an empty order book, so quote creation can fail with 428 (Orderbook is in maintenance or empty). Ask your account manager to provide test liquidity for the market you need.
  • Access is allow-listed. If a KYC link or endpoint returns an access-denied error in sandbox, confirm your partner account is enabled for the environment.

Recommended testing flow: confirm sandbox access → register a sub-member → ask Foxbit to release the sub-member's KYC → make sure the target market has liquidity → run your quote / order / deposit flow.

Webhooks Signature

The signature is a way to verify the integrity of the request. With it, you know that the request was sent by Foxbit and is valid.

Every webhook documented in this reference states its Signature version in its own description. All current webhooks use the V2 signature; the V1 signature remains only for legacy integrations (e.g. the deprecated *_DEPRECATED sub-member webhook variants).

V1 signature (legacy)

The fingerprint is a value sent so that the partner can verify the integrity of the request.

Its value is calculated as follows:

  • SUBMEMBER_SN is the identifier returned when creating a sub-member (POST /sub_member) or when listing sub-members (GET /sub_members). For Gateway users, SUBMEMBER_SN corresponds to the trader_sn field.
  • SHA256.hexdigest(SUBMEMBER_SN#FINGERPRINT_KEY)

V2 signature

To validate the webhook signature, you need the secret registered when the webhook was created.

Every webhook that implements the V2 signature includes the header:

X-FB-SIGNATURE: the value of the generated signature.

Generating the hex-encoded signature

The prehash is the raw request body, exactly as received: the bytes of the HTTP body, before any JSON parsing. Compute the HMAC of those bytes with the secret, using the SHA-256 algorithm, and compare the hex-encoded result with X-FB-SIGNATURE in constant time. X-FB-SIGNATURE is lowercase hex: if your library encodes in uppercase (for example, Convert.ToHexString in .NET), lowercase the result before comparing.

Never compute the signature over a re-serialization of the payload: a parsed object, a typed DTO or class, or the output of your framework's JSON serializer. Key order, spacing, character escaping and number formatting can differ from the bytes Foxbit signed, and a field your model does not declare is dropped, so the signature no longer matches.

Payloads can gain new fields without a change of signature version (for example, event_id in the Gateway and RFQ webhooks). Parse the body only after the signature is valid, and make your parser ignore unknown fields instead of rejecting them.

Each delivery attempt is signed over its own body. A retried webhook whose timestamp changes on every attempt also carries a different signature on every attempt.

Example using JavaScript

With Express, read the body of the webhook route as raw bytes (express.raw), not with express.json(). Other frameworks have the same option: rawBody: true in NestJS (req.rawBody), a content-type parser with parseAs: 'buffer' in Fastify, request.get_data() in Flask and await request.body() in FastAPI.

const crypto = require('crypto');
const express = require('express');

const secret = 'YOUR WEBHOOK SECRET GOES HERE';
const app = express();

// express.raw keeps req.body as the Buffer received: the bytes Foxbit signed. The limit raises its
// 100 KB default, which would refuse a larger webhook.
app.post('/webhooks/foxbit', express.raw({ type: 'application/json', limit: '1mb' }), (req, res) => {
  // req.body is a Buffer only when the request came with the type above.
  if (!Buffer.isBuffer(req.body)) {
    return res.sendStatus(401);
  }

  const received = Buffer.from(req.get('X-FB-SIGNATURE') || '');
  const expected = Buffer.from(crypto.createHmac('sha256', secret).update(req.body).digest('hex'));

  if (received.length !== expected.length || !crypto.timingSafeEqual(received, expected)) {
    return res.sendStatus(401);
  }

  // Parse only after the signature is valid.
  const webhook = JSON.parse(req.body.toString('utf8'));
  console.log('valid webhook:', webhook.webhook_type);

  return res.sendStatus(200);
});

Glossary

Partner-specific business and technical terms. For general Foxbit REST API terms (auth, markets, deposits/withdrawals, etc.), see the Glossary in the public API docs ↗.

Term Definition
Partner API A set of Foxbit APIs designed for business partners. These APIs extend Foxbit's public REST API and usually require specific permissions enabled for the partner.
Partner / Partner Account The business customer integrating with Foxbit APIs to offer crypto, payment, fiat, or account-related services to its own users.
Root Account / Root Member The main account owned by the partner. It acts as the parent account under which sub-members, balances, permissions, reports, and operational flows may be managed.
Sub-member An end-customer account created under a partner/root account. Sub-members are used when a partner wants to offer account creation, custody, trading, deposits, withdrawals, and balance management to its own customers.
Sub-member SN The unique identifier of a sub-member inside Foxbit systems. It is commonly used in API paths, webhook payloads, authentication flows, and reconciliation processes.
Fiat Gateway user A user of the Fiat Gateway product. It is a sub-member of the partner account: the sn that identifies it in the Fiat Gateway user routes is its sub_member_sn.
Non-disclosed Sub-member A sub-member whose identity or personal information is not disclosed through the standard flow. This feature requires specific permission from Foxbit and is not available by default.
Tenant An isolation layer that groups sub-members under a separate business structure inside a single partner account. Tenants allow the same customer document, such as CPF/CNPJ, to exist in different isolated groups when business rules require separation.
Tenant ID The identifier of a tenant. It is used to create, list, or associate sub-members with a specific isolated business group.
Exchange-as-a-Service A model where a partner uses Foxbit infrastructure to offer exchange-like functionality to its own customers, including account creation, funding, trading, custody, and withdrawals.
Transactional Limits The limits applied to an end customer's financial operations. These limits may depend on KYC level, product configuration, partner permissions, and compliance rules.
PnL "Profit and Loss." In this documentation, PnL refers to historical balance and performance-related data for sub-members, usually used to understand financial results over time.
Markets and Limits A product area used to check available trading pairs and operational limits. Limits may vary by product, partner configuration, KYC level, and customer account.
RFQ "Request for Quote." A quote-and-execute product used to buy or sell crypto for an end customer. The partner requests a firm, time-limited quote and then executes it if accepted.
Firm Quote A quote that provides a fixed price for a limited time. Once created, it can be executed according to the quote conditions until it expires or is canceled.
Quote Execution The action of accepting and executing a previously generated quote. In RFQ, this is the step that performs the buy or sell operation.
On-demand Buy/Sell A trading model where the partner requests a quote and executes a buy or sell operation only when needed, instead of placing orders directly on an order book.
Fail Reason A field or message that explains why an operation failed, such as quote expiration, invalid state, insufficient balance, unavailable market, or validation issues.
Cash-in A fiat funding movement into a customer or sub-member account. In the sub-member context, cash-in may refer to moving BRL from the root account to a sub-member or using a Foxbit-provisioned PIX key.
Cash-out A fiat movement out of a customer or sub-member account. Depending on the documentation context, this may be treated as an internal movement or as part of a withdrawal flow.
Internal Transfer A transfer of funds between accounts inside the Foxbit environment, such as between root and sub-member accounts. It should not be confused with external deposits or withdrawals.
Foxbit-provisioned PIX Key A PIX key provisioned by Foxbit for a specific funding setup. It may be used to fund a sub-member account when enabled. It should not be confused with Fiat Gateway flows.
Fiat Gateway A separate product for fiat on-ramp/off-ramp flows, including buy and sell operations connected to fiat settlement. It should not be used as a generic replacement for sub-member funding, internal cash-in, deposits, or withdrawals.
Gateway Order In Fiat Gateway, an order represents a ramp operation. It is not the same as a regular exchange trading order.
Ordering The Fiat Gateway product area responsible for creating, listing, and managing gateway orders.
Gateway Quote A quote used inside the Fiat Gateway flow. It should be understood within the gateway/ramp context and not confused with RFQ unless explicitly stated.
Gateway Limit The operational limit available for Fiat Gateway transactions. These limits may be based on KYC level and partner configuration.
Gateway Currency A crypto asset and network supported by Fiat Gateway. This may include information such as name, symbol, and network.
Gateway Ordering Beta A testing/support area for Fiat Gateway order integration. It may include tools or behavior simulations for non-production integration testing.
Behavior Simulation A testing mechanism used to simulate specific Gateway outcomes, such as successful deposits or failed operations, especially in non-production environments.
Payments A separate Foxbit Pay product for creating crypto payment billings. A payer transfers crypto, and the partner receives settlement according to the configured payment flow, often in fiat.
Foxbit Pay Foxbit's crypto payment platform. It enables partners to generate billings or invoices that can be paid in crypto.
Billing A payment request or charge created through the Payments product. It represents an amount to be paid by a payer, usually through crypto.
Client Billing ID The identifier generated by the partner for a billing. It helps the partner reconcile the Foxbit billing with its own internal records.
Billing State The current status of a billing, such as confirmed or rejected. It is commonly sent through Payments webhooks.
Payment Currency A currency accepted in the Payments product for billing settlement or payer transfer.
Payment Network The blockchain or payment network associated with a payment currency.
Webhook An HTTP notification sent by Foxbit to your systems when an event happens, such as a deposit, withdrawal or status update.
Webhook URL The HTTPS endpoint on your side that receives webhook notifications from Foxbit.
Webhook Type A field that identifies the kind of event being delivered, such as quote status change or billing state change.
Webhook Signature A cryptographic signature used to verify that a webhook was sent by Foxbit and was not modified in transit.
X-FB-SIGNATURE A webhook header that carries the webhook signature. It is used by the receiver to validate webhook authenticity.
Webhook Retry The process of sending a webhook again when the receiving endpoint does not respond successfully. Retry rules may vary by webhook type.
2xx Response An HTTP response status code between 200 and 299. For webhooks, returning a 2xx response usually tells Foxbit that the event was received successfully.
V1 Signature An older webhook signature model. Some webhook groups still use this signature version.
V2 Signature A newer webhook signature model that uses a registered secret to validate webhook payloads.
Fingerprint A value used in V1 webhook signature validation to help verify the integrity of a webhook request.
Fingerprint Key A secret-like value used to calculate or validate a V1 webhook fingerprint.
Reports A group of endpoints that provide account, transaction, statement, or export files for reconciliation and reporting.
Scheduled Partner Export A preconfigured automated report generated for partner accounts, usually available for a specific date.
On-demand Export A custom report generated when requested by the partner, usually for a specific date range and report type.
FULL_STATEMENT A report type containing all account movements for root and sub-members for a specified date.
ROOT_STATEMENT A report type containing account movements for the root member only.
RFQ_QUOTES_EXECUTIONS A report type containing RFQ quote executions for sub-members.
BLOCKTRADE_QUOTES_EXECUTIONS A report type containing Block Trade quote executions for the root member and its sub-members.
ORDERS A report type containing order movements. The exact meaning may depend on the product context.
TRADES A report type containing trade movements for the root member and its sub-members, including trades from sub-member portfolios when applicable.
ACCOUNT_SNAPSHOT A scheduled report type containing a daily snapshot of account balances/positions for the specified date.
LEDGER_V1 The first version of the complete financial ledger report.
LEDGER_V2 An enhanced ledger report version with improved structure and standardization.
Earn A product that allows users to earn yield by keeping cryptocurrencies in staking or DeFi pools. Availability may depend on product rules and permissions.
Portfolio A restricted investment account structure used for managed crypto portfolios, copy trading, or allocation strategies. Portfolio composition may be defined by an external strategy provider and should only be used by partners with the required commercial arrangement and permissions.
Portfolio Account A sub-member account linked to a specific portfolio strategy or managed investment structure.
Portfolio Plan A plan associated with a portfolio account, often related to rebalancing or target allocation.
Balancing Plan A plan that defines how assets should be allocated or reallocated inside a portfolio.
Rebalance The process of adjusting asset allocations inside a portfolio to match a target strategy or reference model.
Reference Model The target allocation model used as a benchmark or source of truth for portfolio rebalancing.
Portfolio Ratio The target or current percentage allocation of a specific asset inside a portfolio.
Performance Metrics Indicators used to evaluate portfolio performance over time, such as returns, variation, or benchmark comparison.
Prime Desk A trading service for executing large cryptocurrency trades with dedicated pricing and deeper liquidity, following a quote-then-execute workflow. Availability depends on your commercial arrangement — ask your account manager.

Overview

Before you start. Where you register and manage sub-members: registration and KYC, accounts, deposits, withdrawals and transfers. Endpoints marked Requires sub-member elsewhere act on one created here.

👉 Start with the Sub-members getting started guide.

What it is. The Sub-members API lets you offer the capabilities of a cryptocurrency exchange to your own customers: register them under your root account, fund them, move assets between them, trade (via RFQ), and withdraw. It is the base product several other products build on. See Sub-members getting started for the end-to-end flow.

Who it's for. Partners building an Exchange-as-a-Service experience for their end customers.

Prerequisites. None — this is the base product. All government reports (IN-1888) are handled automatically by Foxbit.

Don't confuse with. Deposits generates crypto addresses (requires KYC) and lists deposit history — it does not create a FIAT deposit. Fund a sub-member in FIAT via cash-in from your root, or a Foxbit-provisioned PIX key — not the Fiat Gateway PIX, which is a separate product.

Sub-members getting started

Recommended end-to-end flow to onboard and operate a sub-member.

  1. Register the sub-member — see Registration.
  2. Complete KYC and set limits — run KYC through KYC and suitability; KYC raises transactional limits; see Transactional Limits.
  3. Fund the sub-member in FIAT — two options: (a) cash-in from your root — credit your root balance, then internal cash-in to the sub-member (self-serve); or (b) a Foxbit-provisioned PIX key for the sub-member (arranged with your account manager).
  4. Or deposit crypto — generate a crypto address via Deposits (requires KYC).
  5. Trade — use RFQ (the recommended product). The legacy Trading endpoints are being deprecated.
  6. Withdraw — see Withdrawals.

Tip: Most products (RFQ, Portfolio) operate on top of a sub-member, so this flow is usually your starting point.

Registration

Create a sub-member Sub-member management

Rate Limit: 10 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
Request Body schema: application/json
required
email
string or null

Sub-member email

external_id
string <^[a-z0-9_-]+$> <= 36 characters

Unique ID created by users to identify their sub-members, e.g. UUID

tenant_id
string

Unique ID to link the tax_id_number to a tenant under the root account, e.g., UUID

required
object (CreateIdDocument)

Responses

Request samples

Content type
application/json
{
  • "email": "[email protected]",
  • "external_id": "55dde3b8-c4e8-4606-bad8-b6e0cf609e53",
  • "tenant_id": "2a72fee9-c501-4544-8e32-fd4712ed4d29",
  • "id_document": {
    }
}

Response samples

Content type
application/json
{
  • "sn": "FRR3DTLHGJ7DPB",
  • "email": "[email protected]",
  • "external_id": "55dde3b8-c4e8-4606-bad8-b6e0cf609e53",
  • "level": 10,
  • "created_at": "2021-02-15T22:06:32.999Z",
  • "disabled": false,
  • "id_document": {
    },
  • "tenant_id": "2a72fee9-c501-4544-8e32-fd4712ed4d29"
}

Update a sub-member by SN Sub-member management

Update a sub-member by SN.
Rate Limit: 6 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Request Body schema: application/json
required
required
object (UpdateSubMemberIdDocument)

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "sn": "FG7P6MRARY2OAB",
  • "external_id": "c4cf54ed-0f30-4f0c-83a9-694adac0d5e5",
  • "level": 10,
  • "disabled": false,
  • "created_at": "2021-02-15T22:06:32.999Z",
  • "id_document": {
    }
}

Get a sub-member by SN Sub-member management

Rate Limit: 30 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string

Responses

Response samples

Content type
application/json
{
  • "sn": "FRR3DTLHGJ7DPB",
  • "email": "[email protected]",
  • "external_id": "55dde3b8-c4e8-4606-bad8-b6e0cf609e53",
  • "level": 10,
  • "created_at": "2021-02-15T22:06:32.999Z",
  • "disabled": false,
  • "id_document": {
    },
  • "tenant_id": "2a72fee9-c501-4544-8e32-fd4712ed4d29"
}

List sub-members Sub-member management

Rate Limit: 6 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
query Parameters
start_time
string
Example: start_time=2022-02-01T22:06:32.999Z

Filter values after this start_time, must be in ISO-8601 UTC

end_time
string
Example: end_time=2022-02-18T22:06:32.999Z

Filter values before this end_time, must be in ISO-8601 UTC

page_size
integer [ 1 .. 100 ]
Default: 10
Example: page_size=10

The number of entries returned, maximum of 100

page
integer >= 1
Default: 1
Example: page=1

Page to be retrieved from the list

tax_id_number
string
Example: tax_id_number=12345678910

This field filters by exact tax id number. The value must be without any special characters

Responses

Response samples

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

Get a sub-member by ID Sub-member management

Rate Limit: 2 requests per 1 second.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
external_id
required
string

Responses

Response samples

Content type
application/json
{
  • "sn": "FRR3DTLHGJ7DPB",
  • "email": "[email protected]",
  • "external_id": "55dde3b8-c4e8-4606-bad8-b6e0cf609e53",
  • "level": 10,
  • "created_at": "2021-02-15T22:06:32.999Z",
  • "disabled": false,
  • "id_document": {
    },
  • "tenant_id": "2a72fee9-c501-4544-8e32-fd4712ed4d29"
}

Deactivate a sub-member by SN Sub-member management

Deactivate a sub-member by SN. The deactivated sub-member is moved to the blocked level.

When the sub-member is a non-disclosed (ND) sub-member with a segregated custody sub-member, the custody sub-member is deactivated in the same operation, and moved to the blocked level as well.

The balance is not checked: crypto held by the custody sub-member stays there. To close an account that holds a balance, use subMemberLiquidate.

This endpoint requires special permissions. Contact the Foxbit's support if needed.
Rate Limit: 10 requests per 2 seconds per partner, shared by all your sub-members.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string

Responses

Response samples

Content type
application/json
{
  • "success": true
}

KYC and suitability

Identity verification (KYC) and suitability for a sub-member: the hosted verification link, direct upload of the KYC documents, and the suitability journey and status. The sub-member must exist first; see Registration.

Get identity verification URL Sub-member management

Get a sub-member's identity verification page URL. It will only be valid for 15 minutes after this request.
Rate Limit: 2 requests per 1 second

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string

Responses

Response samples

Content type
application/json
{}

Get suitability journey URL Sub-member management

Get a sub-member's suitability journey page URL. The returned token will only be valid for 1 hour after this request.
Required API Key permissions: trade

Rate Limit: 2 requests per 4 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string

Responses

Response samples

Content type
application/json
{}

Get suitability status Sub-member management

Get a sub-member's suitability status, current profile, last submission and validity. The partner derives the need for (re)assessment from the status enum (NOT_ANSWERED, PENDING_RENEWAL and EXPIRED require action) — no boolean flag is returned.
Required API Key permissions: trade

Rate Limit: 2 requests per 4 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string

Responses

Response samples

Content type
application/json
{
  • "status": "VALID",
  • "profile": {
    },
  • "last_submitted_at": "2026-06-24T12:00:00Z",
  • "valid_until": "2028-06-24T12:00:00Z"
}

Upload sub-member KYC documents Sub-member management

Submits a sub-member’s personal (PF) KYC documents (identity document + selfie) already collected by the partner.

Prerequisite: the sub-member must already exist (POST /rest/v3/sub_member). Personal data (name, tax id, birth date) comes from that registration — it is not sent here; this endpoint carries only the files and the document type.

Result: on success responds 201 with the resulting KYC state, e.g. { "state": "verifying" }. Full verification completes asynchronously afterwards (the state is not verified at this point).

Non-disclosed sub-members: for a non-disclosed (ND) sub-member with a custody (POST /sub_member/{sub_member_sn}/custody_migration), send the end client's documents with the ND's SN. They are stored on the custody's own KYC, not on the ND, the personal data checked is the one registered for the custody, and the state answered is the custody's. Follow the verification with GET /sub_member/{sub_member_sn}/custody_sub_member and the submember_kyc webhook. An ND without a custody answers 422 with This non-disclosed sub-member has no custody to receive the KYC documents. The custody's own SN is not accepted and answers 404.

Files: jpg, jpeg, png, jfif, pdf, webm, mp4, mkv — min 1KB per file, 16MB total per request.

Signing (multipart): the raw body is not signed directly. Set X-FB-CONTENT-SHA256 as described in its header, and use that digest in place of the body in the prehash: timestamp + method + path + query + content_sha256.

Rate limit: 2 requests every 10 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
header Parameters
X-FB-CONTENT-SHA256
required
string

Hex SHA-256 that replaces the body in the signature prehash (recomputed server-side to guarantee file + document-type integrity).
Compute it over the concatenation, in this fixed order, of:
1. the raw bytes of id_document_front_file
2. the raw bytes of id_document_backwards_file — only when this file is sent
3. the raw bytes of selfie_file
4. the UTF-8 bytes of the id_document_type value (e.g. ID_CARD)
Example: sha256(front_bytes + selfie_bytes + "ID_CARD") when there is no back file.

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

Front side of the identity document

selfie_file
required
string <binary>

Selfie holding the identity document

id_document_backwards_file
string <binary>

Back of the identity document, when applicable (optional)

id_document_type
required
string
Enum: "ID_CARD" "PASSPORT" "DRIVER_LICENSE"

Identity document type

Responses

Upload company sub-member KYC documents Sub-member management

Submits a company (PJ) sub-member KYC already collected by the partner: the legal representative (administrator) identity document + selfie, plus the corporate documents.

Prerequisite: the sub-member must already exist (POST /rest/v3/sub_member).

Identity (administrator): for ID_CARD/DRIVER_LICENSE send id_document_front_file plus id_document_backwards_file (back); for PASSPORT send id_document_front_file (identification page). Only id_document_front_file and selfie_file are required; id_document_backwards_file is optional.

Corporate documents: company_type is required and determines which corporate documents must be sent: EIRELI/LTDA/MEI/SLU require the articles of association (company_documentation_file); SA requires the board election minutes (company_election_minute_file) + the company bylaws (company_bylaws_file); OTHER requires the articles of association + board election minutes + sole proprietor registration (company_businessman_application_file).

Result: on success responds 201 with the resulting KYC state. Full verification completes asynchronously afterwards.

Non-disclosed sub-members: for a non-disclosed (ND) sub-member with a custody (POST /sub_member/{sub_member_sn}/custody_migration), send the end client company's documents with the ND's SN. They are stored on the custody's own KYC, not on the ND, and the state answered is the custody's. The company checked is the one registered for the custody, never the ND's. Follow the verification with GET /sub_member/{sub_member_sn}/custody_sub_member and the submember_kyc webhook. An ND without a custody answers 422 with This non-disclosed sub-member has no custody to receive the KYC documents. The custody's own SN is not accepted and answers 404.

Files: jpg, jpeg, png, jfif, pdf, webm, mp4, mkv. Min 1KB per file, 16MB total per request.

Rate limit: 2 requests every 10 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
header Parameters
X-FB-CONTENT-SHA256
required
string

Hex SHA-256 that replaces the body in the signature prehash (recomputed server-side to guarantee file + document-type integrity).
Compute it over the concatenation, in this fixed order, of the raw bytes of every file that is present: id_document_front_file, id_document_backwards_file, selfie_file, company_documentation_file, company_election_minute_file, company_bylaws_file, company_businessman_application_file, followed by the UTF-8 bytes of id_document_type, and then, in this fixed order, the UTF-8 bytes of field=value for each text field present: company_type, name, birth_date, id_document_number, phone_number, address_country, address_zipcode, address_state, address_city, address_neighborhood, address_street, address_street_number, address_complement.

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

Front of the administrator identity document (or passport identification page)

id_document_backwards_file
string <binary>

Back of the administrator identity document (ID_CARD/DRIVER_LICENSE only)

selfie_file
required
string <binary>

Selfie of the administrator holding the document

company_documentation_file
string <binary>

Articles of association

company_election_minute_file
string <binary>

Board election minutes

company_bylaws_file
string <binary>

Company bylaws

company_businessman_application_file
string <binary>

Sole proprietor registration

id_document_type
required
string
Enum: "ID_CARD" "PASSPORT" "DRIVER_LICENSE"

Administrator identity document type

company_type
required
string
Enum: "EIRELI" "LTDA" "MEI" "SA" "SLU" "OTHER"

Company type that determines which corporate documents are required: EIRELI/LTDA/MEI/SLU require company_documentation_file (articles of association); SA requires company_bylaws_file (company bylaws) + company_election_minute_file (board election minutes); OTHER requires company_documentation_file + company_election_minute_file + company_businessman_application_file

name
string

Administrator full name

birth_date
string

Administrator birth date (ISO-8601)

id_document_number
string

Administrator identity document number

phone_number
string

Company phone number

address_country
string

Company address country code (ISO 3166-1 alpha-2)

address_zipcode
string

Company address postal code

address_state
string

Company address state

address_city
string

Company address city

address_neighborhood
string

Company address neighborhood

address_street
string

Company address street

address_street_number
string

Company address street number

address_complement
string

Company address complement

Responses

Upload a sub-member Docless KYC report Sub-member management

Submits the partner's own KYC report for a personal (PF) sub-member, in place of the identity document and the selfie sent to POST /sub_member/{sub_member_sn}/documents/personal.

Who can use it: only if Foxbit has Docless enabled for your account, and only for a personal sub-member whose basic verification is approved: VERIFIED_SIMPLE_ACCOUNT or ADDITIONAL_VERIFICATION_REQUIRED, or PENDING after Foxbit requested changes to a Docless report or refused one in review. Name, tax id and birth date come from the sub-member registration (POST /rest/v3/sub_member). The following answer 422 with the reason in details: an account without Docless, a non-disclosed (ND) sub-member, a company (PJ) sub-member, a sub-member whose basic verification is not approved, a sub-member in PENDING after its documents were refused (send the documents again through documents/personal), a sub-member already under verification, verified or rejected, and a registration missing the personal data.

Result: on success responds 201 with the resulting KYC state, e.g. { "state": "verifying" }. The decision is asynchronous and arrives on the submember_kyc webhook: the first accepted Docless report goes from VERIFYING to VERIFIED, with no document analysis. Foxbit may later request changes to a sub-member approved by Docless: it goes from VERIFIED to PENDING with required_action SUBMIT_DOCUMENT, and its level returns to the basic verification one. A new report sent through this endpoint then moves it back to VERIFYING, where it waits for a manual review by Foxbit instead of being approved automatically. If that review refuses the report, the sub-member goes from VERIFYING to PENDING with required_action RESUBMIT_DOCUMENT_AND_SELFIE; a new report through this endpoint is accepted there too.

File: exactly one docless_file and no other field — pdf, jpg, jpeg, png, jfif — min 1KB, 16MB total per request; a larger request is refused with 413 before it reaches the API. A new report replaces the previous one.

Signing (multipart): the raw body is not signed directly. Set X-FB-CONTENT-SHA256 to sha256(docless_file_bytes), and use that digest in place of the body in the prehash: timestamp + method + path + query + content_sha256.

Rate limit: 2 requests every 10 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FSUBMEMBER1234

The alphanumeric unique identifier of the sub-member the report is about

header Parameters
X-FB-CONTENT-SHA256
required
string

Hex SHA-256 of the raw bytes of docless_file, which replaces the body in the signature prehash (recomputed server-side to guarantee the integrity of the file): sha256(docless_file_bytes). Nothing else enters the digest.

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

The partner's KYC report for the sub-member (pdf, jpg, jpeg, png or jfif)

Responses

Liquidation

Start and list the liquidations of a sub-member.

Liquidate a sub-member by SN Sub-member management

This endpoint allows the root account to liquidate a specified sub-member account by selling all assets to BRL and transferring the resulting balance to the main account.

This process is asynchronous. After the request, the sub-member account will be liquidated in a background job. By default, the sub-member will be deactivated upon completion.

Optionally accepts a body { "deactivate": boolean } (default true). When deactivate is false, the BRL balance is still swept to the root account but the sub-member remains active (allowing repeated liquidations); the disabled=true verification below only applies when deactivate is true (the default).

To verify if the liquidation was successful, retrieve the sub-member and check if the disabled field is set to true.

This operation is restricted to API Keys with Trade and Withdraw permissions. Special permissions are required for this endpoint. Please contact Foxbit support if needed.

Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Request Body schema: application/json
optional
deactivate
boolean

Whether to deactivate the sub-member after liquidation — defaults to true

Responses

Request samples

Content type
application/json
{
  • "deactivate": true
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Liquidation requested successfully"
}

List sub-member liquidations by SN Sub-member management

List the BRL liquidation sweeps of a sub-member (most recent first), cursor-paginated.
Rate Limit: 12 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
query Parameters
page_size
number
Example: page_size=10

Number of entries returned, maximum of 200

after
string
Example: after=249f20b1-ba78-44e9-b70b-cb6750295517

Cursor — retrieve entries after the given uuid

before
string
Example: before=249f20b1-ba78-44e9-b70b-cb6750295517

Cursor — retrieve entries before the given uuid

Responses

Response samples

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

Metadata and tax

Read a sub-member's metadata and its annual income tax report.

Get sub-member metadata by SN Sub-member management

Get a sub-member's metadata by SN.
Rate Limit: 2 requests per 1 second

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string

Responses

Response samples

Content type
application/json
{
  • "key": "value"
}

Get a sub-member annual income tax by SN Sub-member management

Get a sub-member's annual income tax by SN.
Rate Limit: 1 request per 1 second

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
year
required
number
Example: 2023

The year of the annual income tax report

sub_member_sn
required
string
Example: FQ3LUOWQ745P6B

The SN of the sub-member

Responses

Response samples

Content type
application/json
{}

Non-disclosed

A non-disclosed sub-member is one whose identity and personal information are not revealed or disclosed.

To use this feature, you need a special permission from Foxbit.
Currently, the permission registration is carried out through the CX team.

Create your sub-member Sub-member management

Rate Limit: 60 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
Request Body schema: application/json
required
external_id
string <^[a-z0-9_-]+$> <= 36 characters

Unique ID created by users to identify their sub-members, e.g. UUID

Responses

Request samples

Content type
application/json
{
  • "external_id": "55dde3b8-c4e8-4606-bad8-b6e0cf609e53"
}

Response samples

Content type
application/json
{
  • "sn": "FG7P6MRARY2OAB",
  • "externalId": "c4cf54ed-0f30-4f0c-83a9-694adac0d5e5",
  • "level": "SIMPLE",
  • "disabled": false,
  • "createdAt": "2021-02-15T22:06:32.999Z"
}

List your sub-members Sub-member management

Rate Limit: 3 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)

Responses

Response samples

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

Migrate a non-disclosed sub-member to custody Sub-member management

Migrates an existing non-disclosed (ND) sub-member to a segregated custody sub-member.
The ND identified by the sub_member_sn path parameter must already exist; this endpoint does not create it. It creates the custody sub-member, opens a custody migration record and enqueues the balance sweep in background.

This operation is idempotent: repeating it for the same ND with the same data returns the existing migration record and re-enqueues the sweep when needed; repeating it with different identity keys (external_id, tax id or fiscal id) is rejected. Those three are the whole comparison: every other field in the body is ignored on a retry, not rejected — this route migrates/reprocesses, it does not update the custody data. Provide the x-idempotent header to safely replay the same request.

Required API Key permissions: trade.

Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FG7P6MRARY2OAB

The serial number (SN) of the existing non-disclosed sub-member to migrate

Request Body schema: application/json
required
external_id
required
string <= 36 characters

Unique id of the end client at the partner — the custody idempotency key

required
object

End-client identity document + address (the sub-member creation shape plus company_name, foreigner and fiscal_id_number)

Responses

Request samples

Content type
application/json
{
  • "external_id": "55dde3b8-c4e8-4606-bad8-b6e0cf609e53",
  • "id_document": {
    }
}

Response samples

Content type
application/json
{
  • "id": "249f20b1-ba78-44e9-b70b-cb6750295517",
  • "status": "PENDING",
  • "fail_reason": null,
  • "original_sn": "FG7P6MRARY2OAB",
  • "destination_sn": "FB547LQOWSUJQB",
  • "finished_at": null,
  • "created_at": "2024-03-07T23:04:19.658Z"
}

List the custody migrations of a non-disclosed sub-member Sub-member management

Lists the custody migration records of the non-disclosed (ND) sub-member identified by sub_member_sn, most recent first. Each record has the same shape returned by POST /sub_member/{sub_member_sn}/custody_migration — it is the same record, read instead of created.

Use it to follow the migration: while status is PENDING or RUNNING, the balance sweep — the background process that drains the ND, moving crypto to the custody and BRL to the root account — is still running; FINISHED means the migration completed; FAILED exposes the reason in fail_reason.

An empty data with 200 — never a 404 — is the answer whenever the sub-member exists under your account but has no migration records: an ND that was never migrated, and also a sub_member_sn that is not a non-disclosed sub-member at all. A 404 means only one thing: that sub_member_sn does not exist under your account.

Records of a finished migration may be cleaned up over time, so an empty list does not by itself prove the ND was never migrated.

Cursors are the id of a record and must come from pagination of a previous response. A value that is not a well-formed cursor returns 400, and so does an unknown query parameter; a well-formed cursor that matches no record of this sub-member returns 200 with an empty data, which is what a cursor kept past a cleanup looks like.

Rate Limit: 12 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FG7P6MRARY2OAB

The serial number (SN) of the non-disclosed sub-member that owns the migrations

query Parameters
before
string <uuid>

Cursor for the previous page — the id of a record, taken from pagination.before. Cannot be combined with after

after
string <uuid>

Cursor for the next page — the id of a record, taken from pagination.after. Cannot be combined with before

page_size
integer [ 1 .. 20 ]

Entries per page (1 to 20). Defaults to 20 when omitted

Responses

Response samples

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

Get the custody sub-member of a non-disclosed sub-member Sub-member management

Returns the segregated custody sub-member linked to the non-disclosed (ND) sub-member identified by sub_member_sn. The response is the GET /sub_member/{sub_member_sn} shape minus two fields that do not apply to a custody and are therefore absent from this response: sub_member_verification_url (a custody has no verification link — its KYC is done only through the documents sent with the ND's SN, as described below) and tenant_id (a tenant belongs to the partner, while a custody belongs to its ND, so it cannot carry one — which is also why the migration request body takes no tenant_id).

email is always null for the same kind of reason: a custody is created without one.

KYC: id_document.state and level are the custody's own KYC — the end client's verification — and not the ND's. A custody is created unverified, and its verification starts when you send the end client's documents with the SN of the ND, through POST /sub_member/{sub_member_sn}/documents/personal or POST /sub_member/{sub_member_sn}/documents/company. Once approved, level becomes the level your account grants after KYC. Use this endpoint to follow that verification: GET /sub_member/{sub_member_sn} keeps returning the ND's own state and level. Every change is also notified by the submember_kyc webhook, under the ND's sn.

The link is created by POST /sub_member/{sub_member_sn}/custody_migration. Until the ND is migrated there is no custody to return, and this endpoint answers 404 with Custody sub-member not found. — the same answer given when sub_member_sn is a regular sub-member rather than an ND, since neither has a custody. An sn that does not exist under your account answers 404 with Sub-Member not found.

Rate Limit: 30 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FG7P6MRARY2OAB

The serial number (SN) of the non-disclosed sub-member that owns the custody

Responses

Response samples

Content type
application/json
{
  • "sn": "FRR3DTLHGJ7DPB",
  • "email": null,
  • "external_id": "55dde3b8-c4e8-4606-bad8-b6e0cf609e53",
  • "level": 10,
  • "created_at": "2021-02-15T22:06:32.999Z",
  • "disabled": false,
  • "id_document": {
    }
}

List the accounts of the custody sub-member of a non-disclosed sub-member Sub-member management

Lists the accounts of the segregated custody sub-member linked to the non-disclosed (ND) sub-member identified by sub_member_sn. Each item has the same shape returned by GET /sub_member/{sub_member_sn}/accounts — they are accounts, read one level deeper.

Use it to audit the segregated balance: it is the partner-facing view of what the custody holds after a migration.

Cryptocurrencies only. A custody sub-member has no fiat account by construction — it neither trades nor settles in BRL — so no fiat balance can appear here. To read the BRL balance of the ND itself, use GET /sub_member/{sub_member_sn}/accounts. Only listed currencies are returned: while a currency is hidden — a delisting, an incident window — its account does not appear here even if it still holds a balance. Prediction sub-account currencies are excluded on the same grounds.

The link to the custody is created by POST /sub_member/{sub_member_sn}/custody_migration. Until the ND is migrated there is no custody to read, and this endpoint answers 404 with Custody sub-member not found. — the same answer given when sub_member_sn is a regular sub-member rather than an ND, since neither has a custody. An sn that does not exist under your account answers 404 with Sub-Member not found.

An empty data with 200 is a normal answer, not an error: a custody is created holding nothing, and its accounts come into existence as the balance sweep moves each currency across. Once an account exists it stays, so a custody that has been fully swept back out answers with its accounts at zero balance rather than an empty list.

No query parameters and no pagination: a custody holds one account per currency, far fewer than a page, so the listed crypto accounts arrive in a single response.

Rate Limit: 16 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FG7P6MRARY2OAB

The serial number (SN) of the non-disclosed sub-member that owns the custody

Responses

Response samples

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

Tenant

An isolation layer where each "tenant" acts as an independent grouping unit under a single partner account.

This allows the same identity to manage multiple, isolated environments—each with its own configurations, permissions, and operational instances (sub-members)—enabling flexible management of diverse business lines or client segments.

List tenants Sub-member management

Returns a list of tenants available to the authenticated user.
Rate Limit: 3 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
query Parameters
first
number
Example: first=10

The number of entries returned, maximum of 200

after
string
Example: after=388775a0-88e1-4fdd-8ed0-63c239646387

Cursor that returns entries after the given ID

before
string
Example: before=f54e260d-55e0-4011-94db-145a57e43af

Cursor that returns entries before the given ID

Responses

Response samples

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

Create tenant Sub-member management

Creates a tenant.
Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
Request Body schema: application/json
required
name
required
string

Name of the tenant. Must be between 2 and 255 characters

Responses

Request samples

Content type
application/json
{
  • "name": "Acme Inc"
}

Response samples

Content type
application/json
{
  • "uuid": "4726b88f-2343-40bc-9ec8-d4dfd9853f85",
  • "name": "Acme Inc",
  • "created_at": "2026-03-03T14:28:04.493Z"
}

List tenant sub members Sub-member management

Returns a list of sub members for a given tenant available to the authenticated user.
Rate Limit: 3 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
tenantId
required
string
Example: 0bf528bd-6644-4d2f-b9cc-fa4d46222a37

Tenant UUID

query Parameters
page_size
number
Example: page_size=10

The number of entries returned, maximum of 200

after
string
Example: after=FEKFHPOTH4UIVC

Retrieve entries after the given cursor

before
string
Example: before=FEKFHPOTH4UIVB

Retrieve entries before the given cursor

Responses

Response samples

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

Accounts

List accounts Sub-member management

Rate Limit: 16 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string

Responses

Response samples

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

Deposits

Get a deposit address Sub-member management

Rate Limit: 6 requests per 1 second.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
query Parameters
network_code
required
string
Example: network_code=bitcoin
currency_symbol
required
string
Example: currency_symbol=btc

Responses

Response samples

Content type
application/json
Example
{
  • "currency_symbol": "btc",
  • "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
  • "message": "Address was retrieved successfully",
  • "destination_tag": "",
  • "network": {
    }
}

List deposits Sub-member management

Rate Limit: 6 requests per 1 second.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
query Parameters
start_time
string
Example: start_time=2022-02-01T22:06:32.999Z

Filter values after this start_time, must be in ISO-8601 UTC

end_time
string
Example: end_time=2022-02-18T22:06:32.999Z

Filter values before this end_time, must be in ISO-8601 UTC

page_size
integer [ 1 .. 100 ]
Default: 10
Example: page_size=10

The number of entries returned, maximum of 100

page
integer >= 1
Default: 1
Example: page=1

Page to be retrieved from the list

Responses

Response samples

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

Get deposit by sn Sub-member management

A crypto deposit in AWAITING_TRAVEL_RULE waits for its Travel Rule declaration: see Travel Rule getting started.

Rate Limit: 3 requests per 1 second.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
deposit_sn
required
string

Responses

Response samples

Content type
application/json
{
  • "sn": "OKMAKSDHRVVREK",
  • "state": "ACCEPTED",
  • "currency_symbol": "btc",
  • "amount": "1.0",
  • "fee": "0.1",
  • "created_at": "2022-02-18T22:06:32.999Z",
  • "details_crypto": {
    },
  • "travel_rule": {
    }
}

Submit the Travel Rule declaration of a sub-member deposit Sub-member management

Declares the Travel Rule of a sub-member crypto deposit: who holds the origin wallet and, for a third party, who sends the funds.

Step 5 of 7 of the step-by-step guide.

Before calling. The sub-member deposit must be in AWAITING_TRAVEL_RULE with travel_rule null (read it with GET /sub_member/{sub_member_sn}/deposits/{deposit_sn}). Take the countries from GET /travel_rule/countries and, when the declaration asks for operation_reason, the purpose from GET /sub_member/{sub_member_sn}/deposits/{deposit_sn}/travel_rule/operation_reasons.

📘 Before filling this body, read the step-by-step guide
Step 2: which variant to send
Step 3: the fields each path asks
Step 4: the countries and the purpose
Step 5: every error and its code
Step 7: what each answer means

The declaration is made for the sub-member: its account type (person or company) decides the company-only fields.

Body. wallet_owner and wallet_type pick one of four variants (DepositTravelRuleOwnPrivateWallet, DepositTravelRuleOwnExchangeWallet, DepositTravelRuleThirdPartyPrivateWallet, DepositTravelRuleThirdPartyExchangeWallet); each lists its fields and when its path asks them, and someone else goes under sender. Send only the fields of your variant, with the names and the shape the deposit read returns in travel_rule.

Outcome. The answer brings the new state and documents_required: credited (ACCEPTED), held for the documents listed in travel_rule.required_documents (send them with POST /sub_member/{sub_member_sn}/deposits/{deposit_sn}/travel_rule/documents) or under review (AWAITING_TRAVEL_RULE_REVIEW). A deposit is never canceled while it waits.

Required API Key permissions: deposit

Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FSUBMEMBER1234

The alphanumeric unique identifier of the sub-member that owns the deposit

deposit_sn
required
string
Example: DPKXMRDT7H4VBN

The alphanumeric unique identifier of the deposit

Request Body schema: application/json
required

One of the variants below, picked by wallet_owner and wallet_type

One of
wallet_owner
required
string
Value: "SELF"

The client holds the origin wallet

wallet_type
required
string
Value: "SELF_HOSTED"

A private (unhosted) wallet

purpose_description
string

Purpose of the deposit in the client's own words. Mandatory above USD 50,000 (Annex IV); ignored up to it

Responses

Request samples

Content type
application/json
Example
{
  • "wallet_owner": "SELF",
  • "wallet_type": "SELF_HOSTED",
  • "purpose_description": "Moving my own funds"
}

Response samples

Content type
application/json
{
  • "sn": "DPKXMRDT7H4VBN",
  • "state": "AWAITING_TRAVEL_RULE_REVIEW",
  • "documents_required": false,
  • "travel_rule": {
    }
}

List the Travel Rule operation reasons of a sub-member deposit Sub-member management

Lists the BACEN operation reasons (purposes) the Travel Rule declaration of the sub-member deposit accepts.

Step 4 of 7 of the step-by-step guide (only when the declaration asks for operation_reason).

When to call. When the declaration asks for operation_reason: an Exchange/VASP or a sender abroad, or a client resident abroad (fx_residence_country other than BR). The sub-member deposit must be in AWAITING_TRAVEL_RULE with travel_rule null (read it with GET /sub_member/{sub_member_sn}/deposits/{deposit_sn}).

Then. Send the chosen code as operation_reason to POST /sub_member/{sub_member_sn}/deposits/{deposit_sn}/travel_rule. When the purpose has required_documents, those files go to POST /sub_member/{sub_member_sn}/deposits/{deposit_sn}/travel_rule/documents after the declaration, which lists them again. If the declaration refuses the purpose, call this route again and pick one of the purposes it returns.

Required API Key permissions: deposit

Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FSUBMEMBER1234

The alphanumeric unique identifier of the sub-member that owns the deposit

deposit_sn
required
string
Example: DPKXMRDT7H4VBN

The alphanumeric unique identifier of the deposit

header Parameters
Locale
string
Default: EN
Enum: "EN" "PT-BR"

Language used to localize the operation reason description field. Accepted values (case-sensitive): EN, PT-BR. Defaults to EN when the header is omitted. Any other value (including lowercase variants such as en or pt-BR) causes the request to fail with 400 Bad Request.

Responses

Response samples

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

Send the Travel Rule documents of a sub-member deposit Sub-member management

Sends the documents the Travel Rule purpose of the sub-member deposit requires.

Step 6 of 7 of the step-by-step guide (only when the declaration asks for them).

When to call. After POST /sub_member/{sub_member_sn}/deposits/{deposit_sn}/travel_rule answered documents_required true: the sub-member deposit stays in AWAITING_TRAVEL_RULE until the files arrive. Which files to send is travel_rule.required_documents in the declaration answer, and travel_rule.required_documents in GET /sub_member/{sub_member_sn}/deposits/{deposit_sn}.

Files. pdf, jpg, jpeg, png, csv, xls, xlsx; up to 20 files and 25MB per request.

Send the whole set in one request. The first request moves the sub-member deposit on — to review, or it is credited — and a later request is refused. Nothing is stored when the sub-member deposit is not waiting for documents.

Then. Follow the sub-member deposit with GET /sub_member/{sub_member_sn}/deposits/{deposit_sn}.

Required API Key permissions: deposit

Rate Limit: 2 requests per 10 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FSUBMEMBER1234

The alphanumeric unique identifier of the sub-member that owns the deposit

deposit_sn
required
string
Example: DPKXMRDT7H4VBN

The alphanumeric unique identifier of the deposit

header Parameters
X-FB-CONTENT-SHA256
required
string

Hex SHA-256 that replaces the body in the signature prehash (recomputed server-side to guarantee file integrity).
Compute it over the concatenation of the raw bytes of every files part, in the order they are sent.
Example: sha256(file1_bytes + file2_bytes).

Request Body schema: multipart/form-data
required
files
required
Array of strings <binary> [ items <binary > ]

The documents requested for the chosen purpose

Responses

Response samples

Content type
application/json
{
  • "sn": "DPKXMRDT7H4VBN",
  • "state": "AWAITING_TRAVEL_RULE_REVIEW",
  • "case_state": "UNDER_REVIEW"
}

Withdrawals

Create withdrawal Sub-member management

Once confirmed, a crypto withdrawal may be held in AWAITING_TRAVEL_RULE until you declare it for the sub-member — see Travel Rule getting started. The inline travel_rule is deprecated but still required on crypto withdrawals: it only completes an own account at a Brazilian Exchange/VASP, and any other path waits for the declaration.

Required API Key permissions: withdraw
Rate Limit: 30 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Request Body schema: application/json
required
One of
amount
required
string

The amount to be withdrawn

currency_symbol
string

Currency symbol

required
object

Bank branch data

Responses

Request samples

Content type
application/json
Example
{
  • "amount": "1",
  • "currency_symbol": "brl",
  • "bank": {
    }
}

Response samples

Content type
application/json
Example
{
  • "sn": "WBZYUBF73C4GUU",
  • "sub_member_sn": "WBZYUBF73C4GUU",
  • "state": "SUBMITTED",
  • "currency_symbol": "brl",
  • "amount": "0.5",
  • "fee": "0.5",
  • "created_at": "2022-09-15T12:38:18.510Z",
  • "details_fiat": {
    },
  • "travel_rule": {
    }
}

List withdrawals Sub-member management

Rate Limit: 6 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
query Parameters
start_time
string
Example: start_time=2022-02-01T22:06:32.999Z

Filter values after this start_time, must be in ISO-8601 UTC

end_time
string
Example: end_time=2022-02-18T22:06:32.999Z

Filter values before this end_time, must be in ISO-8601 UTC

page_size
integer [ 1 .. 100 ]
Default: 10
Example: page_size=10

The number of entries returned, maximum of 100

page
integer >= 1
Default: 1
Example: page=1

Page to be retrieved from the list

Responses

Response samples

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

Get a withdrawal Sub-member management

A crypto withdrawal in AWAITING_TRAVEL_RULE waits for its Travel Rule declaration: see Travel Rule getting started.

Rate Limit: 6 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
withdrawal_sn
required
string

Responses

Response samples

Content type
application/json
{
  • "sub_member_sn": "WBZYUBF73C4GUU",
  • "sn": "OKMAKSDHRVVREK",
  • "state": "DONE",
  • "rejection_reason": "MONTHLY_LIMIT_EXCEEDED",
  • "currency_symbol": "btc",
  • "amount": "1.0",
  • "fee": "0.1",
  • "created_at": "2022-02-18T22:06:32.999Z",
  • "details_crypto": {
    },
  • "details_fiat": {
    },
  • "travel_rule_declaration": {
    },
  • "travel_rule": {
    }
}

Submit the Travel Rule declaration of a sub-member withdrawal Sub-member management

Declares the Travel Rule of a sub-member crypto withdrawal: who holds the destination wallet and, for a third party, who receives the funds.

Step 5 of 7 of the step-by-step guide.

Before calling. The sub-member withdrawal must be in AWAITING_TRAVEL_RULE with travel_rule_declaration null (read it with GET /sub_member/{sub_member_sn}/withdrawals/{withdrawal_sn}). Take the countries from GET /travel_rule/countries and, when the declaration asks for operation_reason, the purpose from GET /sub_member/{sub_member_sn}/withdrawals/{withdrawal_sn}/travel_rule/operation_reasons.

📘 Before filling this body, read the step-by-step guide
Step 2: which variant to send
Step 3: the fields each path asks
Step 4: the countries and the purpose
Step 5: every error and its code
Step 7: what each answer means

The declaration is made for the sub-member: its account type (person or company) decides the company-only fields.

Body. wallet_owner and wallet_type pick one of four variants (WithdrawalTravelRuleOwnPrivateWallet, WithdrawalTravelRuleOwnExchangeWallet, WithdrawalTravelRuleThirdPartyPrivateWallet, WithdrawalTravelRuleThirdPartyExchangeWallet); each lists its fields and when its path asks them, and someone else goes under recipient. Send only the fields of your variant, with the names and the shape the withdrawal read returns in travel_rule_declaration.

Outcome. The answer brings the new state and documents_required: released (PROCESSING), held for the documents listed in travel_rule.required_documents (send them with POST /sub_member/{sub_member_sn}/withdrawals/{withdrawal_sn}/travel_rule/documents), under review (AWAITING_TRAVEL_RULE_REVIEW), or refused with 422 and REJECTED, with the funds returned. A withdrawal whose declaration or documents are still missing 24 hours after being asked is CANCELED, with the funds returned; the 24 hours restart each time a step is asked again and stop during the review. A withdrawal that went back from AWAITING_TRAVEL_RULE_REVIEW to AWAITING_TRAVEL_RULE has no deadline.

Required API Key permissions: withdraw

Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FSUBMEMBER1234

The alphanumeric unique identifier of the sub-member that owns the withdrawal

withdrawal_sn
required
string
Example: WDRZN4HKGT8MBP

The alphanumeric unique identifier of the withdrawal

Request Body schema: application/json
required

One of the variants below, picked by wallet_owner and wallet_type

One of
wallet_owner
required
string
Value: "SELF"

The client holds the destination wallet

wallet_type
required
string
Value: "SELF_HOSTED"

A private (unhosted) wallet

purpose_description
string

Purpose of the withdrawal in the client's own words. Mandatory above USD 50,000 (Annex IV); ignored up to it

Responses

Request samples

Content type
application/json
Example
{
  • "wallet_owner": "SELF",
  • "wallet_type": "SELF_HOSTED",
  • "purpose_description": "Moving to my own wallet"
}

Response samples

Content type
application/json
{
  • "sn": "WDRZN4HKGT8MBP",
  • "state": "AWAITING_TRAVEL_RULE_REVIEW",
  • "documents_required": false,
  • "travel_rule": {
    }
}

List the Travel Rule operation reasons of a sub-member withdrawal Sub-member management

Lists the BACEN operation reasons (purposes) the Travel Rule declaration of the sub-member withdrawal accepts.

Step 4 of 7 of the step-by-step guide (only when the declaration asks for operation_reason).

When to call. When the declaration asks for operation_reason: an Exchange/VASP or a recipient abroad, or a client resident abroad (fx_residence_country other than BR). The sub-member withdrawal must be in AWAITING_TRAVEL_RULE with travel_rule_declaration null (read it with GET /sub_member/{sub_member_sn}/withdrawals/{withdrawal_sn}).

Then. Send the chosen code as operation_reason to POST /sub_member/{sub_member_sn}/withdrawals/{withdrawal_sn}/travel_rule. When the purpose has required_documents, those files go to POST /sub_member/{sub_member_sn}/withdrawals/{withdrawal_sn}/travel_rule/documents after the declaration, which lists them again. If the declaration refuses the purpose, call this route again and pick one of the purposes it returns.

Required API Key permissions: withdraw

Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FSUBMEMBER1234

The alphanumeric unique identifier of the sub-member that owns the withdrawal

withdrawal_sn
required
string
Example: WDRZN4HKGT8MBP

The alphanumeric unique identifier of the withdrawal

header Parameters
Locale
string
Default: EN
Enum: "EN" "PT-BR"

Language used to localize the operation reason description field. Accepted values (case-sensitive): EN, PT-BR. Defaults to EN when the header is omitted. Any other value (including lowercase variants such as en or pt-BR) causes the request to fail with 400 Bad Request.

Responses

Response samples

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

Send the Travel Rule documents of a sub-member withdrawal Sub-member management

Sends the documents the Travel Rule purpose of the sub-member withdrawal requires.

Step 6 of 7 of the step-by-step guide (only when the declaration asks for them).

When to call. After POST /sub_member/{sub_member_sn}/withdrawals/{withdrawal_sn}/travel_rule answered documents_required true: the sub-member withdrawal stays in AWAITING_TRAVEL_RULE until the files arrive. Which files to send is travel_rule.required_documents in the declaration answer, and travel_rule_declaration.required_documents in GET /sub_member/{sub_member_sn}/withdrawals/{withdrawal_sn}.

Files. pdf, jpg, jpeg, png, csv, xls, xlsx; up to 20 files and 25MB per request.

Send the whole set in one request. The first request moves the sub-member withdrawal on — to review, or it is released — and a later request is refused. Before the files are read, the sub-member withdrawal must be in AWAITING_TRAVEL_RULE; send them only after the declaration asked for them.

Then. Follow the sub-member withdrawal with GET /sub_member/{sub_member_sn}/withdrawals/{withdrawal_sn}.

Required API Key permissions: withdraw

Rate Limit: 2 requests per 10 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FSUBMEMBER1234

The alphanumeric unique identifier of the sub-member that owns the withdrawal

withdrawal_sn
required
string
Example: WDRZN4HKGT8MBP

The alphanumeric unique identifier of the withdrawal

header Parameters
X-FB-CONTENT-SHA256
required
string

Hex SHA-256 that replaces the body in the signature prehash (recomputed server-side to guarantee file integrity).
Compute it over the concatenation of the raw bytes of every files part, in the order they are sent.
Example: sha256(file1_bytes + file2_bytes).

Request Body schema: multipart/form-data
required
files
required
Array of strings <binary> [ items <binary > ]

The documents requested for the chosen purpose

Responses

Response samples

Content type
application/json
{
  • "sn": "WDRZN4HKGT8MBP",
  • "state": "AWAITING_TRAVEL_RULE_REVIEW",
  • "case_state": "UNDER_REVIEW"
}

Travel Rule getting started

A crypto deposit or withdrawal can be held by the Travel Rule: a deposit is not credited and a withdrawal is not sent until the sub-member declares who is on the other side. Both follow the same steps; where a call differs, both are linked.

  1. Find the held operation. A withdrawal is held after it is created with POST /sub_member/{sub_member_sn}/withdrawals: its deprecated inline travel_rule is still required, but only completes an own account at a Brazilian Exchange/VASP; any other path waits for the declaration. The deposit and withdrawal webhooks fire when the operation moves to AWAITING_TRAVEL_RULE. It waits for the declaration while its declaration (travel_rule on a deposit, travel_rule_declaration on a withdrawal) is null. Read the deposit or withdrawal.
  2. Pick the variant. Who holds the wallet the funds came from (deposit) or go to (withdrawal), and where it is, pick one of four bodies. Someone else goes under sender on a deposit and recipient on a withdrawal.
    Who holds the walletwallet_ownerwallet_type
    The client, in a private walletSELFSELF_HOSTED
    The client, at an Exchange/VASPSELFHOSTED
    Someone else, in a private walletTHIRD_PARTYSELF_HOSTED
    Someone else, at an Exchange/VASPTHIRD_PARTYHOSTED
  3. Check the fields your path asks. The same rules apply to both operations. The paths:
    1. Your own private wallet
    2. Your own account at an Exchange/VASP in Brazil
    3. Your own account at an Exchange/VASP abroad, and you are a resident of Brazil
    4. Your own account at an Exchange/VASP abroad, and you are not a resident of Brazil
    5. A counterparty in Brazil, and you are a resident of Brazil
    6. A counterparty in Brazil, and you are not a resident of Brazil
    7. A counterparty abroad
    Field1234567
    vasp_name✕✔✔✔✔/✕✔/✕✔/✕
    vasp_entity_country✕✔✔✔–/✕–/✕✔/✕
    sender (deposit) or recipient (withdrawal)✕✕✕✕✔✔✔
    fx_residence_country✕–○✔○✔–
    entity_category✕––C–C–
    institution_type (when entity_category is FINANCIAL_INSTITUTION)✕––✔–✔–
    same_economic_group (when the counterparty is a legal person)✕✕✕✕––C
    purpose_description$–$$–/$$$
    operation_reason✕–✔✔–✔✔

    ✔ required (400 when missing)
    ○ optional (fx_residence_country is BR when omitted)
    C company accounts only: required for a company account, refused with 422 for a personal one
    $ required above USD 50,000 (422 when missing), ignored up to it
    – ignored when sent
    ✕ not part of the variant (400 when sent)
    Two values, as in ✔/✕: the Exchange/VASP variant/the private wallet variant

    Inside the counterparty, person_type, name, tax_id_number and residence_country are always required; entity_category is required for a legal person abroad and institution_type when it is FINANCIAL_INSTITUTION.

  4. Collect the countries and, when asked, the purpose. Countries are ISO 3166-1 alpha-2 codes from GET /travel_rule/countries, with BR for Brazil. When the path asks for operation_reason, list the purposes of the deposit or withdrawal and keep the chosen code; its required_documents tells which files it will ask for.
  5. Submit the declaration. To the deposit or withdrawal, with the fields of your variant only. The account type of the sub-member (person or company) decides the company-only fields. A withdrawal must be declared within 24 hours of being held, unless it went back from AWAITING_TRAVEL_RULE_REVIEW to AWAITING_TRAVEL_RULE (step 7): then there is no deadline. The errors:
    Status (code)When
    400 (400)The body does not fit the path: a field outside the variant, one the path asks left out, or a malformed one. details lists every problem at once, naming the field
    422 (422)The operation cannot take the declaration: it is not held for the Travel Rule, the deposit was already declared, or the withdrawal follows the deprecated inline flow
    422 (4001)The declaration is refused: a company-only field sent for a personal account or left out by a company, a CPF or CNPJ with an invalid check digit, a purpose the operation does not accept, or purpose_description missing above USD 50,000. A refusal that rejects a withdrawal leaves it REJECTED, with the funds returned
    The response samples of each declaration route show one example of each.
  6. Send the documents, if asked. When the answer brings documents_required true, send every file listed in travel_rule.required_documents in one request to the deposit or withdrawal. Reading the operation lists them again while they are pending; a withdrawal waits 24 hours for them, counted from when they were asked, unless it went back from AWAITING_TRAVEL_RULE_REVIEW to AWAITING_TRAVEL_RULE (step 7): then there is no deadline.
  7. Follow the outcome. By reading the operation or through the webhooks:
    OutcomeDepositWithdrawal
    DoneACCEPTED: creditedPROCESSING, then DONE: sent
    Waiting for documentsAWAITING_TRAVEL_RULE with documents_required true (step 6)
    Under reviewAWAITING_TRAVEL_RULE_REVIEW, review.state OPEN
    Back to awaiting declarationBack from AWAITING_TRAVEL_RULE_REVIEW to AWAITING_TRAVEL_RULE, with the declaration null again. Send the declaration again, in full, for the same operation. The declaration sent again is always reviewed, whatever the answers, the purpose or the amount: it goes to AWAITING_TRAVEL_RULE_REVIEW, after the documents when the purpose asks for them (step 6), and the operation is never credited or released directly
    RejectedREJECTED: contact our supportREJECTED: rejection_reason says why; the funds are returned
    Nothing arrivesNever canceled: it stays held, without being creditedCANCELED after 24 hours with the declaration or the documents pending on the client; the funds are returned. The 24 hours restart each time a step is asked of the client again, and stop during the review. A withdrawal that went back from AWAITING_TRAVEL_RULE_REVIEW to AWAITING_TRAVEL_RULE has no deadline from then on, for the declaration or for the documents, and is never canceled automatically
Common mistakes. GET /travel_rule/operation_reasons is not the list of purposes a declaration accepts: always list the purposes of the operation being declared. A field that is not part of your variant answers 400: send only the fields of the variant you picked.

Travel Rule

👉 Start with the Travel Rule getting started guide.

The Travel Rule asks who is on the other side of a crypto deposit or withdrawal. When it applies, the sub-member operation is held in AWAITING_TRAVEL_RULE until you declare it for the sub-member: a deposit is not credited and a withdrawal is not sent until then.

The declaration, its purposes and its documents live under the operation, in Deposits and Withdrawals. This section holds the catalogs they read from, which act on no sub-member and answer the same for every caller:

List Travel Rule operation reasons Sub-member management

Retrieve the BACEN operation reasons (purposes) of the Travel Rule.

Not for the declaration. The purposes a Travel Rule declaration accepts depend on the deposit or withdrawal being declared: list them with the operation reasons route of that operation (GET …/deposits/{deposit_sn}/travel_rule/operation_reasons or GET …/withdrawals/{withdrawal_sn}/travel_rule/operation_reasons). The Travel Rule section walks through the whole flow.

This list serves only the deprecated inline travel_rule.operation_reason of POST /withdrawals, and is deprecated with it. Narrow it by value with amount (in BRL) or quantity together with currency_symbol (converted to BRL at the latest ticker price); the two modes are mutually exclusive, and with neither the full active list is returned. Each entry exposes its BRL value range (inclusive); max is null when the tier has no upper bound.

Rate Limit: 2 requests per 2 seconds.

query Parameters
amount
string

BRL amount used to filter operation reasons by value range (e.g. 10000.00). Cannot be combined with quantity/currency_symbol

quantity
string
Example: quantity=0.5

Crypto quantity to be converted to BRL using the latest ticker price. Requires currency_symbol

currency_symbol
string
Example: currency_symbol=btc

Currency symbol paired with quantity (e.g. "btc"). Requires quantity

header Parameters
Locale
string
Default: EN
Enum: "EN" "PT-BR"

Language used to localize the operation reason description field. Accepted values (case-sensitive): EN, PT-BR. Defaults to EN when the header is omitted. Any other value (including lowercase variants such as en or pt-BR) causes the request to fail with 400 Bad Request.

Responses

Response samples

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

List Travel Rule countries Sub-member management

Lists the ISO 3166-1 alpha-2 countries a Travel Rule declaration accepts, with the name localized by the Locale header and ordered by name.

Where they go. vasp_entity_country, sender.residence_country (deposit), recipient.residence_country (withdrawal) and fx_residence_country. BR stands for Brazil. See the Travel Rule section for the declaration flow.

Cache: 10 minutes.
Rate Limit: 2 requests per 2 seconds.

header Parameters
Locale
string
Default: EN
Enum: "EN" "PT-BR"

Language used to localize the country name field. Accepted values (case-sensitive): EN, PT-BR. Defaults to EN when the header is omitted. Any other value causes the request to fail with 400 Bad Request.

Responses

Response samples

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

Transferring

Transfer to a sub-member Sub-member management

Transfer funds from a root-member to its sub-member.
Required API Key permissions: trade

Rate Limit: 6 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Request Body schema: application/json
required
currency_symbol
required
string

The currency of the transfer, e.g., BRL or a crypto asset such as BTC.

amount
required
string

The amount of the transfer

Responses

Request samples

Content type
application/json
{
  • "currency_symbol": "BTC",
  • "amount": "1.0"
}

Response samples

Content type
application/json
{
  • "your_account": {
    },
  • "sub_member_account": {
    },
}

Transfer to a root-member Sub-member management

Transfer funds from a sub-member to its root-member.
Required API Key permissions: trade

Rate Limit: 6 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Request Body schema: application/json
required
currency_symbol
required
string

The currency of the transfer, e.g., BRL or a crypto asset such as BTC.

amount
required
string

The amount of the transfer

Responses

Request samples

Content type
application/json
{
  • "currency_symbol": "BTC",
  • "amount": "1.0"
}

Response samples

Content type
application/json
{
  • "your_account": {
    },
  • "sub_member_account": {
    },
}

Transfer between sub-members Sub-member management

Transfer funds between sub-members of the same root-member.
Required API Key permissions: trade

Rate Limit: 6 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
origin_sub_member_sn
required
string
Request Body schema: application/json
required
target_sn
string

The SN of the sub-member to which the funds will be transferred

currency_symbol
string

The currency of the transfer. Cannot be FIAT (e.g., BRL)

amount
string

The amount of the transfer

Responses

Request samples

Content type
application/json
{
  • "target_sn": "FHKGR3KKR2UIAB",
  • "currency_symbol": "BTC",
  • "amount": "1.0"
}

Response samples

Content type
application/json
{
  • "origin_account": {
    },
  • "target_account": {
    },
  • "origin_sub_member_verification_url": "https://www.foxbit.com.br/verify-account?token=ABC123"
}

List internal transfers Sub-member management

Rate Limit: 6 requests per 1 second.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
query Parameters
start_time
string
Example: start_time=2022-02-01T22:06:32.999Z

Filter values after this start_time, must be in ISO-8601 UTC

end_time
string
Example: end_time=2022-02-18T22:06:32.999Z

Filter values before this end_time, must be in ISO-8601 UTC

page_size
integer [ 1 .. 100 ]
Default: 10
Example: page_size=10

The number of entries returned, maximum of 100

page
integer >= 1
Default: 1
Example: page=1

Page to be retrieved from the list

Responses

Response samples

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

Transactional Limits

List transactional limits for sub-member Sub-member management

List total and available transactional limits for sub-member.
Rate Limit: 3 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string

Responses

Response samples

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

Sub-member webhooks

For insights into our webhook functionality and implementing security verification, refer to the dedicated webhook section.

This section provides detailed information on configuration, usage, and best practices related to webhooks on our platform.

Available events

You subscribe to sub-member events by webhook_type:

webhook_typeDelivered when…
SUB_MEMBER_KYCA sub-member's KYC status changes — the payload carries the current status (see the KYC webhook below for the status values).
SUB_MEMBER_DEPOSITA sub-member deposit is updated.
SUB_MEMBER_WITHDRAWA sub-member withdrawal is updated.
SUB_MEMBER_PORTFOLIO_BALANCE_CHANGEA sub-member's portfolio balance changes.
SUB_MEMBER_SUITABILITYA sub-member's suitability journey progresses — a single registration covers the COMPLETED and RENEWAL_REQUIRED events, discriminated by the event field in the payload.
SUB_MEMBER_BLOCKTRADE_QUOTEA Blocktrade operation of a sub-member changes state — see Blocktrade webhook.

Older *_DEPRECATED variants exist for backward compatibility — do not use them for new integrations.

Registration model

Webhooks are registered centrally at your (root) partner account, not per sub-member — one registration per webhook_type covers all your sub-members.

  • Create — POST /sub_member/webhooks with the target url and the webhook_type.
  • List — GET /sub_member/webhooks returns your registrations, each with its id.
  • Delete — DELETE /sub_member/webhooks/{id} returns 204 on success. Use the id from the list endpoint; an unknown id returns 422 (validation error).

Delivery and retries

If your endpoint does not respond with a 2xx status code, the delivery is retried 4 times at exponential intervals:

Attempt Interval
1st Instant
2nd 4 minutes
3rd 8 minutes
4th 16 minutes
5th (last) 32 minutes
Total 1 hour

Sub-member deposit Webhook

Triggered when a sub-member deposit changes state: when the exchange confirms it, and when the Travel Rule holds it for the declaration (AWAITING_TRAVEL_RULE), puts it under review (AWAITING_TRAVEL_RULE_REVIEW) or rejects it. See Travel Rule getting started.

Read about the signature on Webhooks Signature section.

Signature version: V2

header Parameters
Content-Type
string
Example: application/json
X-FB-SIGNATURE
string
Example: 5036374ab971a06a17d3867242957eebf52666524bf218f7a73447ad41ab25c4
Request Body schema: application/json
timestamp
required
number

Unix timestamp in seconds, stamped when this delivery attempt was sent

webhook_type
required
string

Webhook type

required
object

Responses

Request samples

Content type
application/json
{
  • "timestamp": 1709234676,
  • "webhook_type": "submember_deposit",
  • "data": {
    }
}

Sub-member Withdrawals Webhook

Triggered when a sub-member withdrawal changes state, including when the Travel Rule holds it for the declaration (AWAITING_TRAVEL_RULE), puts it under review (AWAITING_TRAVEL_RULE_REVIEW) or rejects it. See Travel Rule getting started.

Read about the signature on Webhooks Signature section.

Signature version: V2

header Parameters
Content-Type
string
Example: application/json
X-FB-SIGNATURE
string
Example: 5036374ab971a06a17d3867242957eebf52666524bf218f7a73447ad41ab25c4
Request Body schema: application/json
timestamp
required
number

Unix timestamp in seconds, stamped when this delivery attempt was sent

webhook_type
required
string

Webhook type

required
object

Responses

Request samples

Content type
application/json
Example
{
  • "timestamp": 1709234676,
  • "webhook_type": "submember_withdraw",
  • "data": {
    }
}

KYC verification status change Webhook

Triggered when a sub-member's KYC status change.

Read about the signature on Webhooks Signature section.

Signature version: V2

Custody sub-members

A segregated custody sub-member has a KYC of its own: the end client's verification, started by the documents you send with the SN of its non-disclosed (ND) sub-member. Its changes are notified here, to your account, under the ND: sn and external_id are the ND's — the same SN you send the documents with — while status, previous_status, required_action and current_level are the custody's. The same state is returned by GET /sub_member/{sub_member_sn}/custody_sub_member.

Status catalogue

These are the nine statuses this webhook emits. "Who acts" is the single most useful column: where it says End client, nothing moves until the sub-member does something, and required_action tells you what.

Status Meaning Duration Who acts Accepts a new attempt Exits to
UNVERIFIED Registration with no verification completed, or a regression from an expiry, a refused basic verification, a reopened rejection or an internal review Transient, unless an internal review put it here — then it moves only when Foxbit acts End client, unless required_action says otherwise Yes, and required_action says when it is not the client's move VERIFYING_SIMPLE_ACCOUNT, VERIFYING, VERIFYING_LIVENESS, ADDITIONAL_VERIFICATION_REQUIRED, VERIFIED_SIMPLE_ACCOUNT, VERIFIED, PENDING
VERIFYING_SIMPLE_ACCOUNT Basic verification under automated checking Transient, minutes Foxbit Not for the basic verification itself, but the full verification can still be started VERIFIED_SIMPLE_ACCOUNT, ADDITIONAL_VERIFICATION_REQUIRED, VERIFYING, VERIFIED, PENDING, REJECTED, UNVERIFIED
VERIFIED_SIMPLE_ACCOUNT Basic verification approved; the account operates within that scope Stable until a new event End client, if they want the full verification Yes VERIFYING, VERIFYING_LIVENESS, VERIFIED, PENDING, UNVERIFIED
ADDITIONAL_VERIFICATION_REQUIRED Basic verification approved, and your policy requires the full document verification, which has not been sent yet Transient, waits for the client End client Yes VERIFYING, VERIFYING_LIVENESS, VERIFIED, PENDING, UNVERIFIED
VERIFYING Full verification under analysis, automated or human. Manual review sits here Transient, with no guaranteed SLA Foxbit Not applicable VERIFIED, VERIFIED_SIMPLE_ACCOUNT, PENDING, REJECTED, UNVERIFIED
VERIFYING_LIVENESS The submitted document and selfie are being verified Transient Foxbit Not applicable VERIFIED, VERIFYING, PENDING, UNVERIFIED
PENDING Refused, accepting a new submission. This is not "under review" Transient, waits for the client End client Yes, and that is the only purpose of the status VERIFYING, VERIFYING_LIVENESS, VERIFIED, VERIFIED_SIMPLE_ACCOUNT
VERIFIED Fully verified Stable, but reversible Nobody, under normal conditions Not applicable VERIFIED_SIMPLE_ACCOUNT, VERIFYING, UNVERIFIED, PENDING
REJECTED Verification was not approved and re-submission is not self-service. Please contact Foxbit to handle the case Intended as final — see the note below Foxbit support Not through the verification flow UNVERIFIED, when Foxbit reopens the case

EXPIRED is reserved on status: no transition currently produces it, so status never carries it. It can still reach you on previous_status, when an expired sub-member submits again or has the verification reopened. It is kept in both enums because removing a value breaks generated SDKs.

Notes on this contract

  • In ADDITIONAL_VERIFICATION_REQUIRED, the sub-member sends the document and the selfie through the verification link (sub_member_verification_url). They are two separate submissions with a status of their own — the document moves them to VERIFYING, the selfie to VERIFYING_LIVENESS — and either one can be what finally reaches VERIFIED.
  • Suggested message to the end user on REJECTED: "We could not approve your registration with the information provided."
  • REJECTED is not terminal in practice. is_final is currently always false, and a rejected verification can still be reopened by Foxbit. Do not build an irreversible decision on REJECTED while is_final is false.
  • previous_status is the internal state the sub-member left, which is not always the last status you received. On the automated analysis paths — approval and refusal alike — the intermediate hop is suppressed, so you may receive a previous_status belonging to an event that never reached you.
  • previous_status: VERIFIED together with status: VERIFYING means Foxbit started a re-analysis of an approved sub-member. The sub-member's level drops on this path.
  • A sub-member approved through a Docless report (POST /sub_member/{sub_member_sn}/documents/docless) can go from VERIFIED to PENDING when Foxbit requests changes to the report. Its level returns to the basic verification one in the same step, and required_action is SUBMIT_DOCUMENT: for a Docless sub-member, it asks for a new Docless report through the same endpoint, which then waits in VERIFYING for a manual review by Foxbit. If that review refuses the new report, the sub-member goes from VERIFYING to PENDING with required_action RESUBMIT_DOCUMENT_AND_SELFIE: for a Docless sub-member, a new Docless report through the same endpoint is accepted there too.
  • previous_status is null when the state the sub-member left is not one of the published statuses.
  • "Exits to" lists the direct transitions out of each status. Some internal steps are not published, and when a sub-member passes through one, the next event you receive may repeat the status you already had, or carry a status that is not in that row. Its previous_status is then either null or a status you were never notified of — either way it will not match the status you last stored, and that mismatch is how you recognise the hop.
  • Foxbit support can move a sub-member outside the usual path — approving a verification that is still in progress, or reopening one that was rejected or had expired. For both reasons, do not model the catalogue as a closed state machine: always trust status and required_action on the event you received.

Flow KYC Flow

header Parameters
Content-Type
string
Example: application/json
X-FB-SIGNATURE
string
Example: 5036374ab971a06a17d3867242957eebf52666524bf218f7a73447ad41ab25c4
Request Body schema: application/json
timestamp
required
number

Unix timestamp in SECONDS, stamped when this delivery attempt was sent. Retries of the same event carry DIFFERENT values, so this field identifies the attempt, not the event — do not deduplicate by it. Use (sn, updated_at) for that

webhook_type
required
string

Webhook type

required
object

Responses

Request samples

Content type
application/json
{
  • "timestamp": 1609459200,
  • "webhook_type": "submember_kyc",
  • "data": {
    }
}

Sub-member portfolio balance change Webhook

Triggered when a sub-member's portfolio balance changes from PROCESSING to ERROR or DONE. This may happen during investments, liquidity updates, or rebalancing operations.

Read about the signature on Webhooks Signature section.

Signature version: V2

header Parameters
Content-Type
string
Example: application/json
X-FB-SIGNATURE
string
Example: 5036374ab971a06a17d3867242957eebf52666524bf218f7a73447ad41ab25c4
Request Body schema: application/json
timestamp
required
number

Unix timestamp in seconds, stamped when this delivery attempt was sent

webhook_type
required
string

Webhook type

required
object

Responses

Request samples

Content type
application/json
Example
{
  • "timestamp": 1709234676,
  • "webhook_type": "submember_portfolio_balance_change",
  • "data": {
    }
}

Sub-member suitability event Webhook

Triggered when a sub-member's suitability journey progresses. A single SUB_MEMBER_SUITABILITY registration covers both events, discriminated by the event field: COMPLETED (the suitability assessment was submitted and evaluated) and RENEWAL_REQUIRED (the previous assessment expired or is about to expire and must be renewed).

Read about the signature on Webhooks Signature section.

Signature version: V2

header Parameters
Content-Type
string
Example: application/json
X-FB-SIGNATURE
string
Example: 5036374ab971a06a17d3867242957eebf52666524bf218f7a73447ad41ab25c4
Request Body schema: application/json
timestamp
required
number

Unix timestamp in seconds, stamped when this delivery attempt was sent

webhook_type
required
string

Webhook type

required
object

Responses

Request samples

Content type
application/json
{
  • "timestamp": 1709234676,
  • "webhook_type": "submember_suitability",
  • "data": {
    }
}

Create webhook Sub-member management

Create a webhook for monitoring sub-members events
Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
Request Body schema: application/json
required
url
required
string

The URL to receive the webhook events

webhook_type
required
string
Enum: "SUB_MEMBER_DEPOSIT" "SUB_MEMBER_KYC" "SUB_MEMBER_WITHDRAW" "SUB_MEMBER_PORTFOLIO_BALANCE_CHANGE" "SUB_MEMBER_SUITABILITY" "SUB_MEMBER_EARN_APPLICATION" "SUB_MEMBER_BLOCKTRADE_QUOTE"

The webhook type

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "id": "9329771d-204a-4d65-a409-541532c2cc25",
  • "webhook_type": "SUB_MEMBER_DEPOSIT",
  • "secret": "9329771d-204a-4d65-a409-541532c2cc25"
}

List all sub-member events webhooks Sub-member management

Retrieves a list of webhooks utilized to report actions performed by sub-members
Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)

Responses

Response samples

Content type
application/json
{}

Delete webhook Sub-member management

This endpoint deletes the webhook associated with the user responsible for monitoring actions from sub-accounts. Removing a webhook will prevent receiving information from the linked sub-accounts.
Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
id
required
string
Example: 9329771d-204a-4d65-a409-541532c2cc25

The webhook id

Responses

Trading

Before you start. Every endpoint acts on behalf of an existing sub-member (sub_member_sn in the path); create one in Registration.

⚠️ Deprecation notice: The Trading endpoints are being deprecated and will be discontinued in the near future. For buying and selling on behalf of a sub-member, use RFQ — the recommended product going forward.

Create a buy order Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Required API Key permissions: trade
Rate Limit: 15 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Request Body schema: application/json
required
market_symbol
required
string

The market symbol of the order to be created

client_order_id
string

Client-provided numeric identifier (max. of 2^63 - 1) of the order

remark
string <= 100 characters

A note for the order

amount
required
string

The amount intended to buy, expressed in the quote currency and string formatted. It needs to be a decimal with a maximum of 16 decimal places

Responses

Request samples

Content type
application/json
{
  • "market_symbol": "btcbrl",
  • "client_order_id": "451637946501",
  • "remark": "A remarkable note for the order.",
  • "amount": "20.0"
}

Response samples

Content type
application/json
{
  • "id": "1234567890",
  • "sn": "OX2UAMDAAP6CV2",
  • "client_order_id": "451637946501"
}

Create a sell order Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Required API Key permissions: trade
Rate Limit: 15 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Request Body schema: application/json
required
market_symbol
required
string

The market symbol of the order to be created

client_order_id
string

Client-provided numeric identifier (max. of 2^63 - 1) of the order

remark
string <= 100 characters

A note for the order

quantity
required
string

The quantity to sell, expressed in the base currency and string formatted. It needs to be a decimal with a maximum of 16 decimal places

Responses

Request samples

Content type
application/json
{
  • "market_symbol": "btcbrl",
  • "client_order_id": "451637946501",
  • "remark": "A remarkable note for the order.",
  • "quantity": "0.45"
}

Response samples

Content type
application/json
{
  • "id": "1234567890",
  • "sn": "OX2UAMDAAP6CV2",
  • "client_order_id": "451637946501"
}

Create an order Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Create an order with the specified characteristics. An order, after created can be presented in the following states:

State Description
ACTIVE The order is in the matching queue, waiting for deal.
PARTIALLY_FILLED A part of the order has been filled and it is in the matching queue, waiting for deal.
FILLED The order is already traded and not in the matching queue anymore.
PARTIALLY_CANCELED The order is not in the matching queue anymore. The order was partially traded, but the remaining was canceled.
PENDING_CANCEL The order has been removed from the matching queue and is awaiting fund release to finalize the cancellation. Further trades will not occur within that order.
CANCELED The order is not in the matching queue anymore and is completely canceled. There is no trade associated with this order.

Required API Key permissions: trade
Rate Limit: 30 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Request Body schema: application/json
required
One of
side
required
string
Enum: "BUY" "SELL"

The side of the order book you will place the order

type
required
string
Value: "LIMIT"

The type of the order to be created

market_symbol
required
string

The market symbol of the order to be created

client_order_id
string

Client-provided numeric identifier (max. of 2^63 - 1) of the order, sent as a string of digits

remark
string <= 100 characters

A note for the order

stp
string
Enum: "EXPIRE_BOTH" "EXPIRE_MAKER" "EXPIRE_TAKER" "DECREMENT"

Self Trade Prevention (STP) is a mechanism employed by trading platforms to prevent users from inadvertently trading against themselves. You can currently use:
EXPIRE_TAKER: This mode prevents a trade by immediately revoking the taker order's remaining quantity;
EXPIRE_MAKER: This mode prevents a trade by immediately revoking the potential maker order's remaining quantity;
EXPIRE_BOTH: This mode prevents a trade by immediately revoking both the taker and the potential maker order's remaining quantities;
DECREMENT: This mode prevents a trade by immediately revoking the order with the smaller quantity.
Default: EXPIRE_TAKER

slippage_tolerance
string

The slippage tolerance feature protects users from unexpected price changes during trades, ensuring transactions execute within acceptable limits and enhancing trading accuracy.
Each fill is limited to the top-of-book price plus (for buys) or minus (for sells) the tolerance; any remaining quantity that would execute beyond this band is canceled with cancellation reason 205. The effective tolerance may be capped by an exchange-side protection limit.
Must be a decimal string between 0 and 1 with up to 3 decimal places (e.g., 0.025 = 2.5%)

sub_account_type
string
Value: "PREDICTION"

The sub-account type related to orders

quantity
required
string

The quantity of the base currency you want to buy or sell, expressed in string format.
It needs to be a decimal with a maximum of 16 decimal places

price
required
string

The price intended to buy or sell, expressed in the quote currency
and string formatted. It needs to be a decimal with a maximum of 16 decimal places

post_only
boolean

When true your order will not be executed immediately in the market.
It will exist as a maker order on the order book. Maker orders add liquidity to the market.
Only compatible with time_in_force GTC; if the order would match immediately, it is canceled with cancellation reason 202

time_in_force
string
Enum: "GTC" "FOK" "IOC"

TimeInForce (TIF) defines how long an order remains active before it is executed or canceled. Foxbit currently supports:
Good 'til Cancelled (GTC): the order stays active until it is fully filled or canceled manually by the trader;
Fill or Kill (FOK): the order must be fully filled immediately. If 100% of the quantity cannot be filled at once, the entire order is canceled (no partial fills);
Immediate or Cancel (IOC): any part of the order that can be filled immediately is executed, and any remaining quantity is canceled (allows partial fills, unlike FOK).
Only applicable to LIMIT and STOP_LIMIT orders. Default: GTC

Responses

Request samples

Content type
application/json
Example
{
  • "side": "BUY",
  • "type": "LIMIT",
  • "market_symbol": "btcbrl",
  • "client_order_id": "451637946501",
  • "remark": "A remarkable note for the order.",
  • "stp": "EXPIRE_TAKER",
  • "slippage_tolerance": "0.025",
  • "sub_account_type": "PREDICTION",
  • "quantity": "0.42",
  • "price": "250000.0",
  • "post_only": true,
  • "time_in_force": "GTC"
}

Response samples

Content type
application/json
{
  • "id": "1234567890",
  • "sn": "OKMAKSDHRVVREK",
  • "client_order_id": "451637946501"
}

Create a market buy for a sub-member Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Create a market buy order for a sub-member, buying the specified amount at the current market price
Required API Key permissions: trade

Rate Limit: uses the global rate limit values.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Request Body schema: application/json
required
object (CreateSimpleTransactionMarketBuy)

Responses

Request samples

Content type
application/json
{ }

Orders and trades

Look up a sub-member's orders (by SN, ID or client order ID) and list its orders and trades.

List orders Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Rate Limit: 30 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
query Parameters
start_time
string
Example: start_time=2022-02-01T22:06:32.999Z

Filter values after this start_time, must be in ISO-8601 UTC

end_time
string
Example: end_time=2022-02-18T22:06:32.999Z

Filter values before this end_time, must be in ISO-8601 UTC

page_size
integer [ 1 .. 100 ]
Default: 10
Example: page_size=10

The number of entries returned, maximum of 100

page
integer >= 1
Default: 1
Example: page=1

Page to be retrieved from the list

market_symbol
string
Example: market_symbol=btcbrl

The market where the order was placed.

state
string
Enum: "ACTIVE" "CANCELED" "FILLED" "PARTIALLY_CANCELED" "PARTIALLY_FILLED"
Example: state=ACTIVE

The execution state of the orders.

side
string
Enum: "BUY" "SELL"
Example: side=BUY

The order book side where the order was placed.

Responses

Response samples

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

Get an order by ID Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Get an order by its numeric identifier (max. of 2^53 - 1).
Rate Limit: 30 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
order_id
required
number

Responses

Response samples

Content type
application/json
{
  • "id": "1234567890",
  • "sn": "OKMAKSDHRVVREK",
  • "client_order_id": "451637946501",
  • "market_symbol": "btcbrl",
  • "side": "BUY",
  • "type": "LIMIT",
  • "state": "ACTIVE",
  • "price": "290000.0",
  • "stop_price": "240000.0",
  • "price_avg": "295333.3333",
  • "quantity": "0.42",
  • "quantity_executed": "0.41",
  • "instant_amount": "290.0",
  • "instant_amount_executed": "290.0",
  • "created_at": "2021-02-15T22:06:32.999Z",
  • "trades_count": 2,
  • "remark": "A remarkable note for the order.",
  • "fee_paid": "0.0",
  • "post_only": false,
  • "time_in_force": "GTC",
  • "cancellation_reason": 100,
  • "cancellation_reason_order_id": "12345",
  • "stp": "EXPIRE_TAKER",
  • "slippage_tolerance": "0.025",
  • "trail_type": "AMOUNT",
  • "trail_value": "500.0",
  • "limit_offset": "50.0",
  • "origin_stop_price": "240000.0",
  • "stop_price_updated_at": "2026-10-07T13:45:12.000Z",
  • "legs": [
    ],
  • "oco_winner_leg": "STOP_LOSS"
}

Get an order by client ID Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Get an order by its client-provided numeric identifier (max. of 2^63 - 1), sent as a string of digits.
Rate Limit: 6 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
client_order_id
required
string
Example: 57354679787653765

Client-provided numeric identifier (max. of 2^63 - 1) of the order, sent as digits

Responses

Response samples

Content type
application/json
{
  • "id": "1234567890",
  • "sn": "OKMAKSDHRVVREK",
  • "client_order_id": "451637946501",
  • "market_symbol": "btcbrl",
  • "side": "BUY",
  • "type": "LIMIT",
  • "state": "ACTIVE",
  • "price": "290000.0",
  • "stop_price": "240000.0",
  • "price_avg": "295333.3333",
  • "quantity": "0.42",
  • "quantity_executed": "0.41",
  • "instant_amount": "290.0",
  • "instant_amount_executed": "290.0",
  • "created_at": "2021-02-15T22:06:32.999Z",
  • "trades_count": 2,
  • "remark": "A remarkable note for the order.",
  • "fee_paid": "0.0",
  • "post_only": false,
  • "time_in_force": "GTC",
  • "cancellation_reason": 100,
  • "cancellation_reason_order_id": "12345",
  • "stp": "EXPIRE_TAKER",
  • "slippage_tolerance": "0.025",
  • "trail_type": "AMOUNT",
  • "trail_value": "500.0",
  • "limit_offset": "50.0",
  • "origin_stop_price": "240000.0",
  • "stop_price_updated_at": "2026-10-07T13:45:12.000Z",
  • "legs": [
    ],
  • "oco_winner_leg": "STOP_LOSS"
}

List trades Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Rate Limit: 10 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
query Parameters
start_time
string
Example: start_time=2022-02-01T22:06:32.999Z

Filter values after this start_time, must be in ISO-8601 UTC

end_time
string
Example: end_time=2022-02-18T22:06:32.999Z

Filter values before this end_time, must be in ISO-8601 UTC

page_size
integer [ 1 .. 100 ]
Default: 10
Example: page_size=10

The number of entries returned, maximum of 100

page
integer >= 1
Default: 1
Example: page=1

Page to be retrieved from the list

market_symbol
string
Example: market_symbol=btcbrl

The market you want to filter.

order_sn
string
Example: order_sn=ONRR5N6WSFZ2SQ

The specific order identification you want to filter.

Responses

Response samples

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

Get a sub-member order by SN Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Get a specific order of a sub-member by its serial number
Rate Limit: 30 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
order_sn
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "1234567890",
  • "sn": "OKMAKSDHRVVREK",
  • "client_order_id": "451637946501",
  • "market_symbol": "btcbrl",
  • "side": "BUY",
  • "type": "LIMIT",
  • "state": "ACTIVE",
  • "price": "290000.0",
  • "stop_price": "240000.0",
  • "price_avg": "295333.3333",
  • "quantity": "0.42",
  • "quantity_executed": "0.41",
  • "instant_amount": "290.0",
  • "instant_amount_executed": "290.0",
  • "created_at": "2021-02-15T22:06:32.999Z",
  • "trades_count": 2,
  • "remark": "A remarkable note for the order.",
  • "fee_paid": "0.0",
  • "post_only": false,
  • "time_in_force": "GTC",
  • "cancellation_reason": 100,
  • "cancellation_reason_order_id": "12345",
  • "stp": "EXPIRE_TAKER",
  • "slippage_tolerance": "0.025",
  • "trail_type": "AMOUNT",
  • "trail_value": "500.0",
  • "limit_offset": "50.0",
  • "origin_stop_price": "240000.0",
  • "stop_price_updated_at": "2026-10-07T13:45:12.000Z",
  • "legs": [
    ],
  • "oco_winner_leg": "STOP_LOSS"
}

PnL

Foxbit PnL is a service that provides data to build a PnL (Profit and Loss) statement for sub-members, based on the user's historical balance by month.

Get sub-member PnL data Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Rate Limit: 2 requests per 1 second.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: OKMAKSDHRVVREK
query Parameters
currency_symbol
required
any
Example: currency_symbol=BTC

Currency symbol

Responses

Response samples

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

Portfolio overview

Before you start. Listing strategies and their performance needs no sub-member; portfolio accounts, plans, execution and statements act on an existing sub-member; create one in Registration.

What it is. Portfolio (commercially "Carteiras Inteligentes") lets a sub-member invest in a managed strategy: you deposit into a portfolio account, funds are allocated across assets according to a plan, and the portfolio is rebalanced or liquidated over time.

Who it's for. Partners offering managed crypto portfolios / allocation strategies. This is a restricted product — available only to partners with the required commercial arrangement and permissions.

Prerequisites. Requires the Sub-members product (positions are per sub-member) and a portfolio account created for that sub-member. The sub-member must have completed KYC to the required level — otherwise account creation returns 422 (The sub-member does not have the required level to create the transaction.). If list portfolios returns an empty list for a sub-member, no portfolio account exists for them yet.

Reading the performance fields

The positions_overview block reports performance since investment, while per-position fields report short-term price movement. These are different measures and are the most common source of confusion:

FieldMeaning
positions_overview.total_valuation Current total value of the portfolio, in valuation_currency_symbol (e.g. BRL).
positions_overview.absolute_change_valuation Absolute profit/loss since investment, in the valuation currency. Negative means a loss.
positions_overview.percentage_change_valuation Profit/loss percentage since investment, considering all contributions. This is not a 24-hour figure.
positions[].price_variation_24hr 24-hour price variation of that specific asset. Use this for 24h movement — do not compare it against percentage_change_valuation.
positions[].valuation / quantity Current value and held quantity for each asset in the portfolio.

Deposit, rebalance and liquidation states

Portfolio movements are tracked as statement entries. Each entry has a context (INVEST, REBALANCE, LIQUIDITY) and a state:

StateMeaning
PROCESSINGThe movement is being executed.
WAIT_LIQUIDITYWaiting for enough market liquidity to execute the allocation.
DONECompleted.
ERRORThe movement failed and did not complete.

Each entry also exposes amount (planned) and amount_executed (actually executed) — these can differ due to price/liquidity at execution time — plus fee_paid (in BRL). The overall portfolio status follows: INVESTING/INVESTED, REBALANCING/REBALANCED, LIQUIDATING/LIQUIDATED. Portfolios automatically synchronize orders executed in the balancing plan, keeping positions consistent with the reference model.

Don't confuse with. Portfolio deposits and liquidations are specific to the portfolio account and are separate from generic sub-member transfers/withdrawals.

Webhooks. Portfolio balance updates are delivered via the SUB_MEMBER_PORTFOLIO_BALANCE_CHANGE event — register and consume it under Sub-member webhooks (portfolio events share the sub-member webhook registration).

Strategies

List portfolios No sub-member needed

List all available portfolios.
Rate Limit: 4 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)

Responses

Response samples

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

Get portfolio by ID No sub-member needed

Get details of a specific portfolio by its ID.
Rate Limit: 4 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
portfolio_id
required
string

Responses

Response samples

Content type
application/json
{
  • "uuid": "990e4524-a27d-40c4-9f8a-994a62c7486a",
  • "name": "U.S. Strategic Reserve",
  • "description": "Cryptoassets quoted against the US Dollar, prioritizing security and long-term institutional potential.",
  • "min_deposit": "1",
  • "max_deposit": "1000",
  • "currencies": [
    ],
  • "created_at": "2025-10-17T13:33:43.011Z",
  • "last_rebalance_at": "2025-10-17T13:33:43.011Z"
}

List sub-member portfolio plans Requires sub-member

Requires sub-member. portfolio_account_sn is a portfolio account of an existing sub-member; see Portfolio accounts.

Fetches all portfolio plans for rebalance.
Rate Limit: 4 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
portfolio_account_sn
required
string

Responses

Response samples

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

Get portfolio performance metrics No sub-member needed

Returns historical performance metrics for a specific portfolio.
The response includes aggregated indicators.
Note: Simulated data.
Rate Limit: 1 request per 1 second.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
portfolio_id
required
string
query Parameters
period
string
Enum: "SIX_MONTHS" "ONE_YEAR" "TWO_YEARS" "THREE_YEARS" "FOUR_YEARS"
Example: period=ONE_YEAR

Optional time period filter used to aggregate or filter portfolio performance timeseries

Responses

Response samples

Content type
application/json
{
  • "portfolio_name": "Crypto Intelligence",
  • "benchmark_default": "CDI",
  • "summary": {
    },
  • "profitability_by_period": [
    ],
  • "investment_overview": {
    },
  • "performance_timeseries": [
    ]
}

Portfolio accounts

Create portfolio account for sub-member Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Creates a new portfolio account for a sub-member. This endpoint initializes the account, links it to the specified sub-member, and prepares it for all portfolio-related operations.
Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FMF5WNWXKVIPBB

The SN of the sub-member

uuid
required
string
Example: 84cdb7e5-1542-4b8f-818c-fe09308df424

The uuid identifier of the portfolio

Responses

Response samples

Content type
application/json
{
  • "account_sn": "FQ3LUOWQ745P6B",
  • "created_at": "2025-11-06T10:30:00Z",
  • "uuid": "84cdb7e5-1542-4b8f-818c-fe09308df424"
}

List sub-member portfolio accounts Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Fetches all portfolio that a given sub-member is currently subscribed to or has applied.
Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string

Responses

Response samples

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

Get a sub-member portfolio account Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Get a portfolio account that a given sub-member is currently subscribed to or has applied.
Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
portfolio_account_sn
required
string

Responses

Response samples

Content type
application/json
{
  • "sn": "PIBS7AEA5Z2DQ2",
  • "created_at": "2025-11-06T16:29:26.993-03:00",
  • "portfolio_id": "2d01a0b9-e6f3-4165-802b-aed5e8ee26ea",
  • "positions_overview": {
    },
  • "status": "INVESTING",
  • "positions": [
    ]
}

Execution

Deposit Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Deposit an amount into an existing portfolio account.
Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FQ3LUOWQ745P6B

The SN of the sub-member that will deposit in the portfolio

portfolio_account_sn
required
string
Example: FI1YGXWQ631P2B

The SN of the portfolio

Request Body schema: application/json
required
amount
required
string

The amount to be deposited

Responses

Request samples

Content type
application/json
{
  • "amount": "0.0005"
}

Response samples

Content type
application/json
{
  • "status": "PROCESSING",
  • "id": "123e4567-e89b-12d3-a456-426614174000"
}

Withdraw Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Withdraw the entire portfolio of a sub-member for a specific portfolio account.
Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FQ3LUOWQ745P6B

The SN of the sub-member that will be liquidated

portfolio_account_sn
required
string
Example: PA3LUOWQ745P6B

The SN of the portfolio account to be liquidated

Responses

Response samples

Content type
application/json
{
  • "status": "PROCESSING",
  • "id": "123e4567-e89b-12d3-a456-426614174000"
}

Statement

Get a sub-member portfolio statement Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Lists portfolio account movements for a specific sub-member.
Rate Limit: 4 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
portfolio_account_sn
required
string
Example: PA3LUOWQ745P6B

The SN of the portfolio account to fetch the statement from

sub_member_sn
required
string
Example: FQ3LUOWQ745P6B

The SN of the sub-member that owns the portfolio account

query Parameters
after
string
Example: after=8c608cf6-f8c3-4e60-a51a-01327bed8716

Cursor for pagination. Use the "after" value from the previous response to fetch the next page of results

before
string
Example: before=8c608cf6-f8c3-4e60-a51a-01327bed8716

Cursor for pagination. Use the "before" value from the previous response to fetch the previous page of results

page_size
string
Example: page_size=20

Number of items to be returned in the response. Maximum value is 200

Responses

Response samples

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

Get a sub-member portfolio statement by ID Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Retrieves a specific portfolio account movement for a sub-member by statement ID.
Rate Limit: 4 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
portfolio_account_sn
required
string
Example: PA3LUOWQ745P6B

The SN of the portfolio account to fetch the statement from

sub_member_sn
required
string
Example: FQ3LUOWQ745P6B

The SN of the sub-member that owns the portfolio account

statement_id
required
string
Example: 990e4524-a27d-40c4-9f8a-994a62c7486a

The UUID of the statement to fetch details from

Responses

Response samples

Content type
application/json
{
  • "uuid": "990e4524-a27d-40c4-9f8a-994a62c7486a",
  • "amount": "10.00",
  • "amount_executed": "9.80",
  • "fee_paid": "0.20",
  • "context": "INVEST",
  • "state": "DONE",
  • "created_at": "2026-01-27T10:48:57.700-03:00",
  • "portfolio_id": "7a2b7630-b432-4e43-bb90-ae58bf47586f",
  • "portfolio_plan": {
    }
}

Earn overview

Before you start. Every endpoint acts on behalf of an existing sub-member (sub_member_sn in the path); create one in Registration.

What it is. Earn lets a sub-member put idle crypto to work by subscribing to yield products (staking / DeFi pools) and managing those subscriptions — list available earns, subscribe, list applications and unsubscribe. See more at foxbit.com.br/earn ↗.

Who it's for. Partners who want to offer crypto yield/earning to their end customers, alongside the base Sub-members product.

Prerequisites. Requires the Sub-members product — earns are listed and subscribed per sub-member (/sub_member/{sub_member_sn}/earns). Availability depends on product rules and the permissions enabled for your account.

Don't confuse with. Earn generates yield on crypto the sub-member already holds; it is not trading (RFQ) nor a managed allocation strategy (Portfolio).

Manage earns

Endpoints to operate Earn for a sub-member: list the available earns, subscribe, list applications and unsubscribe. See the Earn overview for the product context.

List earns Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

List all currently available Earns to subscribe to. To get the currency icon see the currency documentation in: https://docs.foxbit.com.br/rest/v3/#tag/Market-Data/operation/list-currencies
Rate Limit: 6 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string <Alphanumeric>
Example: FRR3DTLHGJ7DPB

Sub-member unique identifier

query Parameters
currency_symbol
any
Example: currency_symbol=btc,eth

Filter by one or more currency symbols, comma-separated; an empty or whitespace-only value is ignored and no filter is applied

before
any
Example: before=YmVmb3JlLWN1cnNvcg==

Cursor to fetch entries before the given position. Cannot be combined with after

after
any
Example: after=YWZ0ZXItY3Vyc29y

Cursor to fetch entries after the given position. Cannot be combined with before

page_size
number
Example: page_size=10

Entries per page (1 to 20); omitting uses the server default

Responses

Response samples

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

Subscribe to an earn Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Subscribe a specific sub-member to an available Earn.
Required API Key permissions: trade

Rate Limit: 6 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string <Alphanumeric>
Example: FRR3DTLHGJ7DPB

Sub-member unique identifier

earn_id
required
string <= 36 characters
Example: 55dde3b8-c4e8-4606-bad8-b6e0cf609e53

Earn unique identifier in UUID format

Request Body schema: application/json
required
amount
required
string <Numeric>

Amount to subscribe to the product. It can be a decimal with a maximum of 16 decimal places

Responses

Request samples

Content type
application/json
{
  • "amount": "0.001"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "earn_id": "55dde3b8-c4e8-4606-bad8-b6e0cf609e53",
  • "amount": "0.001",
  • "sub_member_sn": "FRR3DTLHGJ7DPB"
}

List of earn applications Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

List all earn applications of a specific sub-member. An earn application can be in one of the following status:

Status Description
SUBSCRIBED The earn application is subscribed but does not provide any profit.
YIELDING The earn application is subscribed and provides profits.
UNSUBSCRIBED The earn application is unsubscribed and does not provide any profit.

Rate Limit: 6 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string <Alphanumeric>
Example: FRR3DTLHGJ7DPB

Sub-member unique identifier

query Parameters
currency_symbol
any
Example: currency_symbol=btc,eth

Filter by one or more currency symbols, comma-separated; an empty or whitespace-only value is ignored and no filter is applied

before
any
Example: before=YmVmb3JlLWN1cnNvcg==

Cursor to fetch entries before the given position. Cannot be combined with after

after
any
Example: after=YWZ0ZXItY3Vyc29y

Cursor to fetch entries after the given position. Cannot be combined with before

page_size
number
Example: page_size=10

Entries per page (1 to 20); omitting uses the server default

Responses

Response samples

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

Get earn application Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Get a single earn application of a sub-member by its identifier.
Rate Limit: 6 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string <Alphanumeric>
Example: FRR3DTLHGJ7DPB

Sub-member unique identifier

application_id
required
string <= 36 characters
Example: 55dde3b8-c4e8-4606-bad8-b6e0cf609e53

Earn application unique identifier in UUID format

Responses

Response samples

Content type
application/json
{
  • "id": "55dde3b8-c4e8-4606-bad8-b6e0cf609e53",
  • "earn_id": "55dde3b8-c4e8-4606-bad8-b6e0cf609e53",
  • "subscribed_at": "2021-01-01T00:00:00.000Z",
  • "unsubscribed_at": "2021-01-01T00:00:00.000Z",
  • "amount": "10.34",
  • "status": "SUBSCRIBED",
  • "profits_total": "10.453"
}

Unsubscribe from an earn Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Unsubscribe a specific sub-member to a subscribed earn application.
Required API Key permissions: trade

Rate Limit: 6 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string <Alphanumeric>
Example: FRR3DTLHGJ7DPB

Sub-member unique identifier

application_id
required
string <= 36 characters
Example: 55dde3b8-c4e8-4606-bad8-b6e0cf609e53

Earn application unique identifier in UUID format

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "application_id": "55dde3b8-c4e8-4606-bad8-b6e0cf609e53",
  • "sub_member_sn": "FRR3DTLHGJ7DPB"
}

Get earn Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Get a single available Earn by its identifier.
Rate Limit: 6 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string <Alphanumeric>
Example: FRR3DTLHGJ7DPB

Sub-member unique identifier

earn_id
required
string <= 36 characters
Example: 55dde3b8-c4e8-4606-bad8-b6e0cf609e53

Earn unique identifier in UUID format

Responses

Response samples

Content type
application/json
{
  • "id": "55dde3b8-c4e8-4606-bad8-b6e0cf609e53",
  • "available_liquidity": "1236.25",
  • "available_per_user": "236.25",
  • "currency": {
    },
  • "customer_apy": "10",
  • "customer_dpy": "0.02739726027",
  • "limit_per_user": "236.25",
  • "minimum_application": "0.01"
}

Remittances

Before you start. Every endpoint acts on behalf of an existing sub-member (sub_member_sn in the path); create one in Registration.

Remittance lets a sub-member send money from Brazil to a beneficiary abroad. The sub-member pays in BRL or from a stablecoin balance it already holds, Foxbit sends the stablecoin to the payout provider and the provider pays the beneficiary in the destination currency.

Available today: origin BRL, USDT or USDC (from_currency, default BRL), destination USD by WIRE transfer to a US bank account, intermediary stablecoin USDT or USDC (stable_currency). With a BRL origin Foxbit buys the stablecoin with the sub-member's BRL balance, and the intermediary is always USDT; with a stablecoin origin nothing is bought, from_amount is the stablecoin amount itself and from_currency must be the same as stable_currency, so USDC is available only as from_currency: USDC with stable_currency: USDC. Every remittance must fall within a minimum and a maximum amount in the destination currency, configured by Foxbit for your partner account: a quote outside them is refused with code 6013, and code 6014 means no limit is configured for the currency yet.

Flow: register the beneficiary bank account, request a quote, execute it and track the remittance by id. A remittance moves through PROCESSING (buying, when the origin is BRL, and sending the stablecoin), PROCESSING_PAYOUT (the provider is paying the beneficiary) and ends as COMPLETED or FAILED (see error_reason).

Requires the Sub-members product and the trade API Key permission (withdraw as well to execute). The remittance product must be enabled for your partner account by Foxbit.

Create a remittance bank account Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Register a beneficiary bank account for the sub-member. Only the WIRE rail is supported: beneficiary type, name, tax id, country of residence, routing number, bank name, account number and address are required, plus the entity category for a COMPANY. The provider approves the account asynchronously: check its status.
Required API Key permissions: trade

Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FTASXASX123A

Sub member SN

Request Body schema: application/json
required
account_name
required
string

Member-defined account name

payment_rail
required
string
Value: "WIRE"

Payment rail

beneficiary_document_type
required
string
Enum: "PERSONAL" "COMPANY"

Bank account beneficiary type: PERSONAL for a person or COMPANY for a legal entity

beneficiary_name
required
string

Beneficiary full name (up to 255 characters)

beneficiary_tax_id
required
string

Beneficiary tax identifier in the country of residence (up to 36 characters)

beneficiary_residence_country
required
string

Beneficiary country of residence (ISO 3166 alpha-2, e.g. US). BR is accepted

beneficiary_entity_category
string
Enum: "05" "71" "78" "79" "53" "56" "58" "59" "60"

Beneficiary entity category, required when beneficiary_document_type is COMPANY and ignored for PERSONAL: 05 non-financial company, 71 non-profit organization, 78 foreign government, 79 multilateral organization, 53 bank or other financial intermediary, 56 investment fund, 58 insurer or reinsurer, 59 pension fund, 60 other financial company

routing_number
required
string

Routing number

bank_name
required
string

Bank name (up to 255 characters)

bank_account_number
required
string

Bank account number

required
object

Beneficiary address

Responses

Request samples

Content type
application/json
{
  • "account_name": "Supplier USD account",
  • "payment_rail": "WIRE",
  • "beneficiary_document_type": "PERSONAL",
  • "beneficiary_name": "Jane Doe",
  • "beneficiary_tax_id": "123456789",
  • "beneficiary_residence_country": "US",
  • "routing_number": "000000000",
  • "bank_name": "Acme Bank",
  • "bank_account_number": "000000000000",
  • "address": {
    }
}

Response samples

Content type
application/json
{
  • "id": "b3f1c2d4-0000-4000-8000-000000000001",
  • "account_name": "Supplier USD account",
  • "payment_rail": "WIRE",
  • "beneficiary_document_type": "COMPANY",
  • "beneficiary_name": "Jane Doe",
  • "beneficiary_tax_id": "123456789",
  • "beneficiary_residence_country": "US",
  • "beneficiary_entity_category": "05",
  • "routing_number": "000000000",
  • "bank_name": "Acme Bank",
  • "bank_account_number": "000000000000",
  • "address": {
    },
  • "status": "APPROVED",
  • "created_at": "2026-08-19T12:00:00.000Z",
  • "updated_at": "2026-08-19T12:00:00.000Z"
}

List remittance bank accounts Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

List the beneficiary bank accounts registered for the sub-member, with cursor pagination.
Required API Key permissions: trade

Rate Limit: 6 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FTASXASX123A

Sub member SN

query Parameters
page_size
number
Example: page_size=10

Entries per page, from 1 to 100 (default 10)

after
string
Example: after=f54e260d-55e0-4011-94db-758f19a3f9cd

Cursor to return entries older than the given id. Cannot be combined with before

before
string
Example: before=9c8b7a6d-55e0-4011-94db-145a57f43abc

Cursor to return entries newer than the given id. Cannot be combined with after

Responses

Response samples

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

Delete a remittance bank account Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Delete a beneficiary bank account. Remittances already created with it are not affected.
Required API Key permissions: trade

Rate Limit: 30 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FTASXASX123A

Sub member SN

id
required
string
Example: b3f1c2d4-0000-4000-8000-000000000001

Remittance bank account id

Responses

Response samples

Content type
application/json
{
  • "success": true
}

List the operation reasons of a remittance Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Lists the BACEN operation reasons (purposes) a remittance of this amount accepts.

When to call. Before the quote: send the to_amount in USD the beneficiary receives. The purposes depend on it (Annex III up to USD 50,000, Annex IV above), and the quote refuses a purpose outside the list of its amount with 422 (code 6033).

Then. Send the chosen code as operation_reason_code in the quote. A purpose with requires_documents asks for the required_documents after the execute.
Required API Key permissions: trade

Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FTASXASX123A

Sub member SN

query Parameters
to_amount
required
string
Example: to_amount=1000.00

Amount the beneficiary receives, in USD, greater than 0: the to_amount of the quote

header Parameters
Locale
string
Default: EN
Enum: "EN" "PT-BR"

Language used to localize the operation reason description field. Accepted values (case-sensitive): EN, PT-BR. Defaults to EN when the header is omitted. Any other value (including lowercase variants such as en or pt-BR) causes the request to fail with 400 Bad Request.

Responses

Response samples

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

Create a remittance quote Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Create a firm quote for a remittance: the amount the sub-member pays in the origin currency and the amount the beneficiary receives. The origin is from_currency: BRL (the default when omitted) buys the stablecoin with the sub-member's BRL balance; USDT or USDC pays from the stablecoin balance the sub-member already holds — nothing is bought, from_amount is the stablecoin amount, and from_currency must be the same as stable_currency. A BRL origin is quoted only in USDT: stable_currency: USDC requires from_currency: USDC. The operation_reason_code sets the purpose: when it requires documents, the response gives the required_documents and the documents_deadline_minutes. The quote is valid for 60 seconds and is consumed by the execute endpoint. The bank account must be APPROVED. Use a new x-idempotent key for every quote.
Required API Key permissions: trade

Rate Limit: 5 requests per 10 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FTASXASX123A

Sub member SN

Request Body schema: application/json
required
operation_reason_code
required
string

BACEN operation nature code (purpose of the remittance), five digits. The accepted codes for the amount come from GET /sub_member/{sub_member_sn}/remittances/operation_reasons; any other is refused with 422 (6029 or 6033)

bank_account_id
required
string

Beneficiary bank account id

to_currency
required
string

Destination currency (e.g. USD)

to_amount
required
string

Amount the beneficiary receives in to_currency (positive decimal string)

stable_currency
required
string
Enum: "USDT" "USDC"

Intermediary stablecoin (USDC only with from_currency USDC)

from_currency
string
Default: "BRL"
Enum: "BRL" "USDT" "USDC"

Origin currency (default BRL; a stablecoin must match stable_currency)

memo
string

Free-form memo forwarded to the beneficiary

Responses

Request samples

Content type
application/json
Example
{
  • "bank_account_id": "b3f1c2d4-0000-4000-8000-000000000001",
  • "to_currency": "USD",
  • "to_amount": "50.00",
  • "stable_currency": "USDT",
  • "operation_reason_code": "67995",
  • "memo": "Invoice 12345"
}

Response samples

Content type
application/json
{
  • "id": "a1b2c3d4-0000-4000-8000-000000000010",
  • "sub_member_sn": "FTASXASX123A",
  • "from_currency": "BRL",
  • "from_amount": "289.50",
  • "to_currency": "USD",
  • "to_amount": "50.00",
  • "stablecoin": "USDT",
  • "expires_at": "2026-08-19T12:01:00.000Z",
  • "required_documents": [
    ],
  • "documents_deadline_minutes": 1440
}

Execute a remittance quote Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Execute a quote and start the remittance. Send an x-idempotent header to retry safely: once the original call has completed, the same key returns the same remittance; while it is still in progress, the same key returns 409. The bank account must still be APPROVED. Track the remittance with the list and detail endpoints. The body carries the Travel Rule answers: own_account_abroad is required, and client_fx_resident_in_brazil only when it is true. Depending on the purpose and the amount, the remittance may wait for documents or for a compliance review before it is processed: check its status.
Required API Key permissions: trade and withdraw

Rate Limit: 5 requests per 10 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FTASXASX123A

Sub member SN

Request Body schema: application/json
required
quote_id
required
string

Quote id returned by the quote endpoint

required
object

Travel Rule answers about the client and the remittance purpose

Responses

Request samples

Content type
application/json
{
  • "quote_id": "a1b2c3d4-0000-4000-8000-000000000010",
  • "travel_rule_answers": {
    }
}

Response samples

Content type
application/json
{
  • "remittance_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}

Cancel a remittance waiting for documents Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Cancel a remittance in AWAITING_TRAVEL_RULE_DOCUMENTS, up to its documents_deadline_at, and release its funds: nothing is bought. Past the deadline, or in any other status, it is refused. Send an x-idempotent header to retry safely.
Required API Key permissions: trade

Rate Limit: 5 requests per 10 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FTASXASX123A

Sub member SN

id
required
string
Example: f47ac10b-58cc-4372-a567-0e02b2c3d479

Remittance id (UUID)

Responses

Response samples

Content type
application/json
{
  • "success": true
}

List remittances Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

List the sub-member's remittances, most recent first, with cursor pagination.
Required API Key permissions: trade

Rate Limit: 6 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FTASXASX123A

Sub member SN

query Parameters
page_size
number
Example: page_size=10

Entries per page, from 1 to 100 (default 10)

after
string
Example: after=f54e260d-55e0-4011-94db-758f19a3f9cd

Cursor to return entries older than the given id. Cannot be combined with before

before
string
Example: before=9c8b7a6d-55e0-4011-94db-145a57f43abc

Cursor to return entries newer than the given id. Cannot be combined with after

Responses

Response samples

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

Get a remittance Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Get a remittance by id, with its status, amounts and beneficiary bank account.
Required API Key permissions: trade

Rate Limit: 6 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FTASXASX123A

Sub member SN

id
required
string
Example: f47ac10b-58cc-4372-a567-0e02b2c3d479

Remittance id (UUID)

Responses

Response samples

Content type
application/json
{
  • "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  • "status": "PROCESSING",
  • "from_currency": "BRL",
  • "from_amount": "289.50",
  • "to_currency_stable": "USDT",
  • "to_amount_stable": "51.00",
  • "to_currency_fiat": "USD",
  • "to_amount_fiat": "50.00",
  • "withdrawal_fee": "1.00",
  • "memo": "Invoice 12345",
  • "imad": "20260819ABC1234",
  • "error_reason": "order_not_executed",
  • "cancel_reason": "DOCUMENTS_DEADLINE_EXPIRED",
  • "client_message": "Send the invoice again.",
  • "required_documents": [
    ],
  • "documents_deadline_at": "2026-08-20T12:00:00.000Z",
  • "created_at": "2026-08-19T12:00:00.000Z",
  • "updated_at": "2026-08-19T12:05:00.000Z",
  • "bank_account": {
    }
}

Send the Travel Rule documents of a remittance Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Send the documents the purpose of a remittance in AWAITING_TRAVEL_RULE_DOCUMENTS requires: the required_documents of the remittance, until its documents_deadline_at. Send the whole set in one request: the remittance then goes to review, or is processed. Follow it with the detail endpoint.
Required API Key permissions: trade and withdraw

Rate Limit: 2 requests per 10 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: FTASXASX123A

Sub member SN

id
required
string
Example: f47ac10b-58cc-4372-a567-0e02b2c3d479

Remittance id (UUID)

header Parameters
X-FB-CONTENT-SHA256
required
string

Hex SHA-256 that replaces the body in the signature prehash (recomputed server-side to guarantee file integrity).
Compute it over the concatenation of the raw bytes of every files part, in the order they are sent.
Example: sha256(file1_bytes + file2_bytes).

Request Body schema: multipart/form-data
required
files
required
Array of strings <binary> [ items <binary > ]

The documents requested for the chosen purpose

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Fiat Gateway overview

Before you start. Markets, limits, quotes and orders need no sub-member; a sell quote accepts an optional sub_member_sn to answer the withdraw fee and the net amount; the user routes (/fiat_gateway/users/{sn}) act on a Fiat Gateway user, which is a sub-member of your account whose sub_member_sn is the sn; create one in Registration.

👉 Start with the Fiat Gateway getting started guide.

What it is. The Fiat Gateway lets you create ramp orders at the partner level. On the on-ramp side, an order generates a PIX charge (QR code + PIX key) to receive FIAT from third parties — you collect the payment and reconcile it via webhooks. Off-ramp flows (converting crypto to FIAT settlement) are also supported through Ordering; this guide focuses on the PIX collection flow.

Who it's for. Partners collecting PIX payments (e.g. cash-in from their own customers or third parties).

Prerequisites. Works standalone. It uses the Sub-members KYC flow to raise transactional limits — see Transactional Limits. See Fiat Gateway getting started for the end-to-end flow.

Don't confuse with. The PIX generated here is a partner-level Gateway charge for receiving third-party payments — it is not how you fund a sub-member's balance. To fund a sub-member in FIAT, use cash-in from your root or a Foxbit-provisioned PIX key for the sub-member.

Order amounts and fees

A gateway order exposes the amounts and fees separately:

FieldMeaning
base_amount / base_currencyAmount and currency of the order's base leg.
quantityQuantity of the crypto asset in the operation.
estimated_quoteEstimated quote of the order at creation time.
tx_feeEstimated network transfer fee.
service_fee / service_fee_currencyFee charged by Foxbit for conversion and transaction, and the currency it is charged in.
transfer_method / chainTransfer method (ONCHAIN) and the network used (e.g. Tron Network (TRC-20)).

Withdraw fee on sell. On a sell, the sub-member's BRL withdraw fee is deducted from the amount credited. A sell quote with sub_member_sn estimates it in withdraw_fee and answers net_quote_amount (quote_amount minus withdraw_fee); the fee charged is the one in force at withdrawal time.

Withdrawal networks. The networks available for a gateway order depend on the asset. Check the supported networks (and their codes) for each currency via the currencies endpoint — each currency exposes its networks and a default_network_code.

Webhooks. Order and payment updates are delivered via Gateway webhooks.

Fiat Gateway getting started

Recommended end-to-end flow for the Fiat Gateway.

  1. Create an order — generate the PIX charge (QR code + PIX key) via Ordering.
  2. Receive the payment confirmation — subscribe to Gateway webhooks.
  3. Reconcile — match the confirmed payment against your records.

Scope: This guide covers the on-ramp flow — collecting PIX payments from third parties at the partner level (for off-ramp orders, see Ordering). The Fiat Gateway does not fund a sub-member's balance — for that, use cash-in from your root or a Foxbit-provisioned PIX key for the sub-member. To raise transactional limits, complete KYC via Transactional Limits.

Market

Foxbit Gateway provides markets for trading cryptocurrencies.
These endpoints allow users to obtain a listing of the markets available on Foxbit Gateway.

List markets No sub-member needed

This route lists all the markets available on the Foxbit Gateway.

Responses

Response samples

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

Get a market No sub-member needed

This route finds a market based on the provided symbol.

path Parameters
symbol
required
string

Responses

Response samples

Content type
application/json
{
  • "symbol": "btcbrl",
  • "name": "BTC/BRL",
  • "base": {
    },
  • "quote": {
    }
}

Limit

Foxbit Gateway provides limits for trading cryptocurrencies.
Your limits are based on your KYC level.
These endpoints allow users to obtain a listing of the limits available on Foxbit Gateway.

List order limits No sub-member needed

This route lists the transactional limits for the provided market.

path Parameters
market_symbol
required
string

Responses

Response samples

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

Quote

Foxbit Gateway provides price quotations for ramp operations.
This endpoint allows users to obtain a quotation for a market before creating an order.

Get a market quotation No sub-member needed

Optional sub-member. Pass sub_member_sn to scope this to a sub-member.

Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
query Parameters
side
required
string
Enum: "buy" "sell"
Example: side=buy

Book side

base_currency
required
string
Example: base_currency=usdt

Base currency

quote_currency
required
string
Example: quote_currency=brl

Quote currency

sub_member_sn
string
Example: sub_member_sn=FRR3DTLHGJ7DPC

Sub-member that will sell. On a sell quote, the answer adds the estimated withdraw fee and net amount for this sub-member. Ignored on buy quotes

required
AmountParam (object) or QuantityParam (object)

expand for details

Responses

Response samples

Content type
application/json
{
  • "id": "990e4524-a27d-40c4-9f8a-994a62c7486a",
  • "side": "buy",
  • "market_symbol": "usdtbrl",
  • "base_amount": "100.00",
  • "quote_amount": "20.00",
  • "price": "5.20",
  • "withdraw_fee": "0.25",
  • "net_quote_amount": "19.75"
}

Ordering

Ordering is the center of Foxbit Gateway's operation.
Note that orders, in the Gateway context, are not the same as Foxbit's trading orders.
A Gateway order is the representation of the ramp operation (on-ramp or off-ramp), not the trading order itself.
These endpoints allow users to perform all operations related to ordering, such as creating and listing orders.

Update an order receive address Deprecated No sub-member needed

Updates the receive address for a buy BTC-Lightning order.
Required API Key permissions: trade

Deprecated: buy orders on BTC-Lightning are no longer accepted, so this route only serves the orders created before that.

This is used to refresh the invoice (receive address) if it expires or if the order is in the AWAITING_ADDRESS state. This situation occurs when the payment chain is BTC-Lightning and the receive address was not included in the original order creation payload.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
id
required
string
Request Body schema: application/json
required
receive_address
required
string

The wallet address where funds will be credited.

required
GatewayBeneficiaryOwnPrivateWallet (object) or GatewayBeneficiaryOwnExchangeWallet (object) or GatewayBeneficiaryThirdPartyPrivateWallet (object) or GatewayBeneficiaryThirdPartyExchangeWallet (object)

Travel Rule beneficiary information. Required: this endpoint is the BTC-Lightning capture point, where the destination is only known once the bolt11 invoice is provided.

Responses

Request samples

Content type
application/json
{
  • "receive_address": "lnbc78910n1pnfq2vshp58yjmdan79s6qqdhdzgynm4zwqd5d7xmw5fk98klysy043l2ahrqspqzhsfppqw508d6qejxtdg4y5r3zarvary0c5xw7kxqrrsssp5zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zygs9qypqqqcqpfaq2fta4zv63cemhzd4gphgj6x8jcxr9xzlexwmmm0xsvyfuj8t6xc6y95qffduapjnh5ft8pzk22tmpurtlyremdl9eqz0klhzyrszcpt2emz9",
  • "travel_rule": {
    }
}

Response samples

Content type
application/json
{
  • "id": "1",
  • "amount": "4.20",
  • "quote_currency": "usdt",
  • "estimated_quote": "5.12",
  • "base_amount": "0.8203125",
  • "base_currency": "brl",
  • "payment_method": "PIX",
  • "created_at": "2022-02-20T13:25:59Z",
  • "canceled_at": "2022-02-20T13:25:59Z",
  • "cancel_reason": "{\"error\":{\"message\":\"The Travel Rule declaration was rejected.\",\"code\":\"TRAVEL_RULE_REJECTED\"}}",
  • "funds_received_at": "2022-02-20T13:25:59Z",
  • "finished_at": "2022-02-20T13:25:59Z",
  • "state": "CREATED",
  • "quantity": "100.00",
  • "side": "buy",
  • "transfer_method": "ONCHAIN",
  • "partner_sn": "FKG3KNQSQLRUAB",
  • "tax_id_number": "12345678900",
  • "receive_account": "[email protected]",
  • "client_email": "[email protected]",
  • "phone_number": "+55 11 99009-9090",
  • "partner_external_id": "1234567890",
  • "beneficiary_name": "MDX TECH LTDA",
  • "partner_reject_id": "1234567890",
  • "tx_id": "d1e98c51e5329b9a5d47e8b7a5c5a5f5e58a17c44e4d4de4adef98e9f2d2d0b2",
  • "tx_fee": "0.2",
  • "receive_address": "xpto-address",
  • "chain": "Tron Network (TRC-20)",
  • "service_fee": "1.50",
  • "service_fee_currency": "brl",
  • "travel_rule": {
    },
  • "travel_rule_declaration": {
    }
}

Create an order No sub-member needed

Creating an order is the first step in executing an operation through the Foxbit Gateway.
Required API Key permissions: trade

In this process, the system identifies the user and the type of operation to be performed. Additionally, the order includes information about the quote to be executed, addresses and accounts for deposits, and payment settings.

For the purpose of new integrations and implementation on sandbox, see Integration Tools.

In the process, orders may have the following statuses:

State Description Action to be done
CREATED The order is waiting to be paid. The user must wait for the payment to be confirmed or reversed. Refund can happen within 24 hours
PAID Order payment has been confirmed The user must wait for the purchase/sale process and transfer of assets to their account to be completed. If any problem occurs during execution, Foxbit will return the payment within 24 hours.
AWAITING_ADDRESS Lightning buy order waiting for the receive address to be provided. Only orders created before buy orders on BTC-Lightning stopped being accepted. Provide the receive address through the update receive address endpoint so the transfer can proceed.
PROCESSING The purchase/sale process and transfer the assets to user account is in progress. The user must wait for the purchase/sale process to complete and transfer the assets to their account. If any problem occurs during execution, Foxbit will manually send the values ​​within 24 hours.
FINISHED The transfer to the user account has been completed -
EXPIRED The order was not paid in enough time to be executed (30 minutes). If a refund has occurred, this user must try to execute a new order. If the error persists, it must then be validated whether the payment violates any deposit rules described below. In any case, if the refund does not happen, Foxbit will refund it within 24 hours.
CANCELED An error occurred during the execution process after the user paid, or some user information prevents certain operations from continuing. In most cases, both fiat and crypto are refunded in the event of cancellation. In some scenarios manual intervention is required and Foxbit will return/send the funds within 24 hours. Many of the cases may occur when withdrawing due to incorrect banking information.
A Sell order sent with travel_rule_declaration follows the Travel Rule of its deposit, and the deadlines above do not apply to its crypto while the decision on that deposit is pending: once its crypto arrives, the order no longer expires and can no longer be canceled until that decision, which has no deadline unless the deposit waits for documents: then 24 hours without them refuse it. A crypto whose deposit was refused (cancel_reason TRAVEL_RULE_REJECTED, TRAVEL_RULE_DOCUMENTS_EXPIRED or DEPOSIT_REJECTED) is not credited and is left to a manual decision by Foxbit.

Authorizations:
(ApiKeyApiTimestampApiSignature)
Request Body schema: application/json
required
One of
tax_id_number
required
string [ 11 .. 14 ] characters

Identity card number (CPF with 11 numbers including leading zeros) or National Register of Legal Entities (CNPJ with 14 numbers including leading zeros). All non-numeric characters will be discarded

name
required
string <= 100 characters

Full name, at least two words are required.
Note: If the tax_id_number is a CNPJ, this field will be the company name

phone_number
string <= 32 characters

Client's phone number

birth_date
required
string

Customer birth date in ISO-8601 UTC

payment_method
object

The payment method to make an order

receive_account
string

Receiver's email address

receive_address
required
string

The wallet address where funds will be credited.
If your asset requires a memo or tag, provide the address in the format address:tag.
Required for BUY orders. Buy orders on BTC-Lightning are not accepted.

quote_id
required
string

Alphanumeric unique identifier of the quote

required
object (CreateAddress)
ip_client
string <= 15 characters

Client's ip

chain
required
string

Defines the network used for the transfer. Note: Make sure it's the same network as the wallet

required
WithdrawalTravelRuleOwnPrivateWallet (object) or WithdrawalTravelRuleOwnExchangeWallet (object) or WithdrawalTravelRuleThirdPartyPrivateWallet (object) or WithdrawalTravelRuleThirdPartyExchangeWallet (object)

Travel Rule declaration of a Buy order: the wallet that receives the crypto, in the same body as the declaration of a sub-member withdrawal. Read it back in travel_rule_declaration of the order. An order without receive_address is read as a Sell, and its declaration as the one of a deposit. Buy orders on BTC-Lightning are not accepted. Take the purpose from GET /fiat_gateway/travel_rule/operation_reasons

Responses

Request samples

Content type
application/json
Example
{
  • "tax_id_number": "12345678900",
  • "name": "Satoshi Nakamoto",
  • "phone_number": "+55 11 99009-9090",
  • "birth_date": "1985-10-19",
  • "payment_method": "PIX",
  • "receive_account": "[email protected]",
  • "receive_address": "xpto-address",
  • "quote_id": "990e4524-a27d-40c4-9f8a-994a62c7486a",
  • "address": {
    },
  • "ip_client": "127.0.0.1",
  • "chain": "Tron Network (TRC-20)",
  • "travel_rule_declaration": {
    }
}

Response samples

Content type
application/json
Example
{
  • "id": "1",
  • "amount": "4.20",
  • "quote_currency": "usdt",
  • "estimated_quote": "5.12",
  • "base_amount": "0.8203125",
  • "base_currency": "brl",
  • "payment_method": "PIX",
  • "created_at": "2022-02-20T13:25:59Z",
  • "state": "CREATED",
  • "quantity": "100.00",
  • "side": "buy",
  • "partner_sn": "FKG3KNQSQLRUAB",
  • "tax_id_number": "12345678900",
  • "receive_account": "[email protected]",
  • "client_email": "[email protected]",
  • "phone_number": "+55 11 99009-9090",
  • "partner_external_id": "1234567890",
  • "beneficiary_name": "MDX TECH LTDA",
  • "tx_id": "d1e98c51e5329b9a5d47e8b7a5c5a5f5e58a17c44e4d4de4adef98e9f2d2d0b2",
  • "tx_fee": "0.2",
  • "receive_address": "xpto-address",
  • "chain": "Tron Network (TRC-20)",
  • "travel_rule": {
    },
  • "travel_rule_declaration": {
    },
  • "qr_code": "data:image/png;base64,iVBORw0KGg...",
  • "pix_key": "00020126360014BR.GOV.BC..."
}

Get user's order list No sub-member needed

Optional sub-member. Pass trader_sn to scope this to a sub-member.

Lists all the orders based on the provided query parameters.
The possible values of the state field of each order are described in the order model of the response schema.

Authorizations:
(ApiKeyApiTimestampApiSignature)
query Parameters
start_time
string
Example: start_time=2022-02-01T22:06:32.999Z

Filter values after this start_time, must be in ISO-8601 UTC

end_time
string
Example: end_time=2022-02-18T22:06:32.999Z

Filter values before this end_time, must be in ISO-8601 UTC

page_size
integer [ 1 .. 100 ]
Default: 10
Example: page_size=10

The number of entries returned, maximum of 100

page
integer >= 1
Default: 1
Example: page=1

Page to be retrieved from the list

trader_sn
string
Example: trader_sn=FKG3KNQSQLRUAB

Trader serial number (same as the sub-member serial number)

Responses

Response samples

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

Cancel an order No sub-member needed

Cancel an Foxbit Gateway's order based on the provided order ID.
Required API Key permissions: trade

Only orders on CREATED state can be canceled.
A Sell order sent with travel_rule_declaration cannot be canceled once its crypto was received: only the decision on its deposit ends it (422).
The order being canceled is not the exchange's order, but the Foxbit Gateway's one.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "canceled_at": "2008-10-03T03:00:00.000Z"
}

Update order bank data No sub-member needed

Update bank data of a sell order.
Required API Key permissions: trade

You need to pass a valid order ID as a path parameter to update bank data a sell order.
it will update the bank data and retry again to withdraw the sell order.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
id
required
string
Request Body schema: application/json
required
required
object

Bank account data

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "id": "1",
  • "amount": "4.20",
  • "quote_currency": "usdt",
  • "estimated_quote": "5.12",
  • "base_amount": "0.8203125",
  • "base_currency": "brl",
  • "payment_method": "PIX",
  • "created_at": "2022-02-20T13:25:59Z",
  • "canceled_at": "2022-02-20T13:25:59Z",
  • "cancel_reason": "{\"error\":{\"message\":\"The Travel Rule declaration was rejected.\",\"code\":\"TRAVEL_RULE_REJECTED\"}}",
  • "funds_received_at": "2022-02-20T13:25:59Z",
  • "finished_at": "2022-02-20T13:25:59Z",
  • "state": "CREATED",
  • "quantity": "100.00",
  • "side": "sell",
  • "transfer_method": "ONCHAIN",
  • "partner_sn": "FKG3KNQSQLRUAB",
  • "tax_id_number": "12345678900",
  • "receive_account": "[email protected]",
  • "client_email": "[email protected]",
  • "phone_number": "+55 11 99009-9090",
  • "partner_external_id": "86ef8b4b-b2d5-412a-b412-94069e778313",
  • "beneficiary_name": "MDX TECH LTDA",
  • "partner_reject_id": "1234567890",
  • "tx_id": "d1e98c51e5329b9a5d47e8b7a5c5a5f5e58a17c44e4d4de4adef98e9f2d2d0b2",
  • "tx_fee": "0.2",
  • "receive_address": "xpto-address",
  • "chain": "Tron Network (TRC-20)",
  • "service_fee": "1.50",
  • "service_fee_currency": "brl",
  • "travel_rule": {
    },
  • "travel_rule_declaration": {
    },
  • "bank_account": {
    }
}

Get an order No sub-member needed

This route finds an order based on the provided order ID.
The possible values of the state field are described in the order model of the response schema.

Rate Limit: 30 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
order_id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "1",
  • "amount": "4.20",
  • "quote_currency": "usdt",
  • "estimated_quote": "5.12",
  • "base_amount": "0.8203125",
  • "base_currency": "brl",
  • "payment_method": "PIX",
  • "created_at": "2022-02-20T13:25:59Z",
  • "canceled_at": "2022-02-20T13:25:59Z",
  • "cancel_reason": "{\"error\":{\"message\":\"The Travel Rule declaration was rejected.\",\"code\":\"TRAVEL_RULE_REJECTED\"}}",
  • "funds_received_at": "2022-02-20T13:25:59Z",
  • "finished_at": "2022-02-20T13:25:59Z",
  • "state": "CREATED",
  • "quantity": "100.00",
  • "side": "buy",
  • "transfer_method": "ONCHAIN",
  • "partner_sn": "FKG3KNQSQLRUAB",
  • "tax_id_number": "12345678900",
  • "receive_account": "[email protected]",
  • "client_email": "[email protected]",
  • "phone_number": "+55 11 99009-9090",
  • "partner_external_id": "1234567890",
  • "beneficiary_name": "MDX TECH LTDA",
  • "partner_reject_id": "1234567890",
  • "tx_id": "d1e98c51e5329b9a5d47e8b7a5c5a5f5e58a17c44e4d4de4adef98e9f2d2d0b2",
  • "tx_fee": "0.2",
  • "receive_address": "xpto-address",
  • "chain": "Tron Network (TRC-20)",
  • "service_fee": "1.50",
  • "service_fee_currency": "brl",
  • "travel_rule": {
    },
  • "travel_rule_declaration": {
    }
}

List the Travel Rule operation reasons of an order No sub-member needed

Lists the BACEN operation reasons (purposes) the Travel Rule declaration of a Buy or a Sell order accepts.

When to call. Before creating an order whose declaration asks for operation_reason: an Exchange/VASP abroad, a recipient (Buy) or a sender (Sell) abroad, or a client resident abroad (fx_residence_country other than BR). The client’s own private wallet never asks for it.

Quantity. Send the currency the order buys or sells and the base_amount of the quote the order uses. The purposes depend on the USD value of that quantity: listed for another quantity, mainly near USD 50,000, they may not be the ones the order accepts.

Then. Send the chosen code as operation_reason in the travel_rule_declaration of the order. A purpose with requires_documents asks for the files listed in its required_documents: once the order is created, send them with POST /fiat_gateway/orders/{id}/travel_rule/documents, before the PIX of a Buy order or before the crypto of a Sell order.

Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
query Parameters
currency
required
string
Example: currency=btc

Symbol of the crypto currency the order buys or sells

quantity
required
string
Example: quantity=0.0015

Quantity the order buys or sells, greater than 0: the base_amount of the quote the order uses

header Parameters
Locale
string
Default: EN
Enum: "EN" "PT-BR"

Language used to localize the operation reason description field. Accepted values (case-sensitive): EN, PT-BR. Defaults to EN when the header is omitted. Any other value (including lowercase variants such as en or pt-BR) causes the request to fail with 400 Bad Request.

Responses

Response samples

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

Send the Travel Rule documents of an order No sub-member needed

Sends the Travel Rule documents of an order whose purpose asks for them: the files listed in travel_rule_declaration.required_documents of the order (read it with GET /fiat_gateway/orders/{order_id}).

When. Send the documents before the PIX: then the declaration goes from PENDING straight to UNDER_REVIEW or APPROVED when the PIX is credited. The order takes them while CREATED or PAID, with travel_rule_declaration.status PENDING and documents_required true, or AWAITING_DOCUMENTS. An order PAID in AWAITING_DOCUMENTS without the documents for 24 hours has its declaration rejected and is canceled with TRAVEL_RULE_DOCUMENTS_EXPIRED (see cancel_reason). After a wait for documents the price rule of the purchase applies: if the BRL paid no longer buys the quantity of the order, it is canceled with PRICE_CHANGED_DURING_REVIEW. On a Sell order, send the documents before the crypto as well: while the order is CREATED with the declaration PENDING, the Gateway stores them and delivers them when the deposit is declared. Sent after the crypto arrived, they are taken while AWAITING_DOCUMENTS: the order stays CREATED until they are sent or 24 hours pass, which cancel it with TRAVEL_RULE_DOCUMENTS_EXPIRED as well. A wait for documents does not change the price rule of the sale: the crypto that arrived is sold at the price of the moment of the sale, with or without a wait (see APPROVED in travel_rule_declaration.status), so the longer the wait, the more that price can move from the quote.

One submission per order. Send every file at once: a second submission is refused with 422. documents_sent true before the PIX, or before the crypto of a Sell order, means the Gateway stored the files, not that Compliance received them: if their delivery when the PIX is credited, or when the deposit is declared, is refused (a file expired or replaced in storage), documents_sent goes back to false and the declaration becomes AWAITING_DOCUMENTS: send the documents again. AWAITING_DOCUMENTS with documents_sent true means the Gateway holds the documents and delivers them itself as soon as it can: do not send them again. If that delivery is refused, documents_sent goes back to false and the travel_rule_status_change webhook comes again with from_status and status AWAITING_DOCUMENTS: then send the documents again. After a 502 or a 503, read the order before sending again: with documents_sent true the documents were taken.

Files. Multipart field files, up to 20 files and 16 MB per request, of the types pdf, jpg, jpeg, png, csv, xls, xlsx. Above 16 MB the request is refused by the ingress (nginx) with 413 and an HTML body, outside the error envelope of this API. Sign the request over X-FB-CONTENT-SHA256, the digest of the files, instead of the body.

Answer. 201 with the id of the order and the status and documents_sent of its declaration: PENDING before the PIX or the crypto; after it, UNDER_REVIEW or APPROVED, or AWAITING_DOCUMENTS while the Gateway still delivers the documents it holds. Each refusal is a 422 with its own message.

Required API Key permissions: trade

Rate Limit: 2 requests per 10 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
id
required
integer [ 1 .. 2147483647 ]
Example: 1639

ID of the order, as answered by POST /fiat_gateway/orders. Any other value answers 404

header Parameters
X-FB-CONTENT-SHA256
required
string

Hex SHA-256 that replaces the body in the signature prehash (recomputed server-side to guarantee file integrity).
Compute it over the concatenation of the raw bytes of every files part, in the order they are sent.
Example: sha256(file1_bytes + file2_bytes).

Request Body schema: multipart/form-data
required
files
required
Array of strings <binary> [ items <binary > ]

The documents requested for the chosen purpose

Responses

Response samples

Content type
application/json
{
  • "id": 1639,
  • "travel_rule_declaration": {
    }
}

Currency

Currencies are the cryptocurrencies supported by Foxbit Gateway.
Information such as name, symbol and network is available on this endpoint.
This endpoint allows users to obtain information about the currencies supported by Foxbit Gateway.

Get a currency No sub-member needed

Rate Limit: 2 requests per 1 second.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
currency_symbol
required
string
Example: usdt

A currency symbol

query Parameters
side
required
string
Enum: "BUY" "SELL"
Example: side=BUY

Currency side

Responses

Response samples

Content type
application/json
{
  • "currency_symbol": "USDT",
  • "name": "Tether",
  • "networks": [
    ]
}

User

Endpoints for managing Foxbit Gateway user resources, such as registered bank accounts.

List user bank accounts Requires sub-member

Requires sub-member. The sn of a Fiat Gateway user is its sub_member_sn; create one in Registration.

This endpoint allows for the retrieval of a user's bank information using an identifier called SN.
The returned information includes details such as the bank, agency, account number, and type of bank account.
The SN is a required parameter in the API call and corresponds to the same value found in the order payload as trader_sn.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sn
required
string
Example: FLLUKJWRAK0FQB

The user identifier for querying. It can be found as trader_sn in the order payload.

Responses

Response samples

Content type
application/json
{
  • "user_sn": "FGLR63WG3Y14Q9",
  • "bank_accounts": {
    }
}

Create new user bank accounts Requires sub-member

Requires sub-member. The sn of a Fiat Gateway user is its sub_member_sn; create one in Registration.

This endpoint allows the creation of a user banking information using an identifier called SN.
Required API Key permissions: trade

Information returned includes details such as bank, branch, account number, and bank account type.
The SN is a required parameter in the API call and corresponds to the same value found in the request payload as trader_sn.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sn
required
string
Request Body schema: application/json
required
required
object

Bank account data

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "code": "1",
  • "branch": {
    },
  • "account": {
    },
  • "uuid": "85befa81-5986-43aa-a778-eb757d0e950e"
}

Gateway webhooks

For insights into our webhook functionality and implementing security verification, refer to the dedicated webhook section.

This section provides detailed information on configuration, usage, and best practices related to webhooks on our platform.

The following events are available for Gateway webhooks:

Event When it fires
status_change When an order is created and on every order state change. The payload contains from_state, to_state and the timestamps of the steps already completed. When the new state is CANCELED, a cancel_reason object is included, with a code beside the message when the Travel Rule canceled the order or, on a Sell order sent with travel_rule_declaration, its deposit was refused.
travel_rule_status_change When the Travel Rule declaration of an order changes status: the declaration of a Buy order, made when the PIX is credited, or the declaration of the deposit of a Sell order, made when the crypto arrives. The declaration can move while the order stays PAID (Buy) or CREATED (Sell), so this is the event that tells you, not status_change. The payload contains from_status, status and, for a rejection, rejection_reason. Register it with the TRAVEL_RULE_STATUS_CHANGE webhook type. It is sent apart from status_change, so the two can arrive in either order, and a retried delivery can arrive minutes later: the current status is always travel_rule_declaration.status in GET /fiat_gateway/orders/{order_id}.
refund_alert When a refund of a deposit is on its way to the depositor. It fires in two cases: a deposit is received that does not match any order, or an order is canceled after its payment was credited, nothing was executed and the refund was processed automatically. A canceled order whose refund needs manual handling by Foxbit does not send this alert. The payload contains the amount and the masked depositor tax ID, and the message tells the two cases apart. In the second case the status_change to CANCELED is sent before this alert, but a retried delivery can make it arrive after.

Every webhook request is wrapped in the following envelope and signed with the V2 signature (see Webhooks Signature):

{
  "event_id": "3f1c9a52-7d4e-4b8a-9c2f-6e1d0a7b5c34",
  "webhook_type": "status_change",
  "timestamp": 1708968361000,
  "data": { ... }
}

event_id identifies the event and is the same on every retry of its delivery; timestamp is the time of each attempt, in milliseconds. The payload can gain new fields: validate the signature over the raw body and ignore the fields you do not use (see Webhooks Signature).

Delivery and retries

A delivery fails when your endpoint answers with a status other than 2xx, does not answer within 10 seconds, cannot be reached (for example, connection refused or a DNS failure), or answers with a body over 64 KiB. Redirects are followed and only the final answer counts; a 301, 302 or 303 redirect turns the POST into a GET without the body, so register the final URL of your endpoint. A failed delivery is retried, up to 4 attempts in total:

AttemptWait after the previous failure
1stInstant
2nd4 minutes
3rd8 minutes
4th (last)16 minutes

The 4th attempt comes about 28 minutes after the 1st. After the 4th failed attempt the event is not sent again. The current state of an order is always in GET /fiat_gateway/orders/{order_id}.

Every attempt carries the same event_id, while timestamp, and with it the signature, changes on each one. A delivery can arrive more than once, for example when your endpoint processed it but answered after 10 seconds. Store the event_id of each webhook you process and, when it arrives again, answer 2xx without processing it again. A retried delivery can also arrive after a later event, so do not rely on the order of arrival.

Answer as soon as the webhook is stored and do the processing afterwards. Foxbit does not read the response body.

Gateway order refund alert Webhook

When a deposit does not match the value of an order or contains invalid account holder information, a webhook is triggered to notify that a refund has been scheduled.

Read about the signature on Webhooks Signature section.

Signature version: V2

header Parameters
Content-Type
string
Example: application/json
X-FB-SIGNATURE
string
Example: 5036374ab971a06a17d3867242957eebf52666524bf218f7a73447ad41ab25c4
Request Body schema: application/json
event_id
required
string <uuid>

Unique ID of the event (UUID v4). It is the same on every retry of the delivery, while timestamp changes on every attempt: deduplicate by it, skipping an event_id you already processed. See the retries in Gateway webhooks.

timestamp
required
number

Time of this delivery attempt, in milliseconds since the Unix epoch. It changes on every retry; use event_id to deduplicate

webhook_type
required
string

Webhook type

required
object

Responses

Request samples

Content type
application/json
{
  • "event_id": "3f1c9a52-7d4e-4b8a-9c2f-6e1d0a7b5c34",
  • "timestamp": 1709234676472,
  • "webhook_type": "refund_alert",
  • "data": {
    }
}

Gateway order state change Webhook

Triggered when a gateway order has the status changed.

Read about the signature on Webhooks Signature section.

Signature version: V2

header Parameters
Content-Type
string
Example: application/json
X-FB-SIGNATURE
string
Example: 5036374ab971a06a17d3867242957eebf52666524bf218f7a73447ad41ab25c4
Request Body schema: application/json
event_id
required
string <uuid>

Unique ID of the event (UUID v4). It is the same on every retry of the delivery, while timestamp changes on every attempt: deduplicate by it, skipping an event_id you already processed. See the retries in Gateway webhooks.

timestamp
required
number

Time of this delivery attempt, in milliseconds since the Unix epoch. It changes on every retry; use event_id to deduplicate

webhook_type
required
string

Webhook type

required
object

Responses

Request samples

Content type
application/json
{
  • "event_id": "3f1c9a52-7d4e-4b8a-9c2f-6e1d0a7b5c34",
  • "timestamp": 1709234676472,
  • "webhook_type": "status_change",
  • "data": {
    }
}

Gateway order Travel Rule status change Webhook

Triggered when the Travel Rule declaration of an order changes status: the declaration of a Buy order, made when the PIX is credited, or the declaration of the deposit of a Sell order, made when the crypto arrives. The declaration can move while the order stays PAID (Buy) or CREATED (Sell), as a review keeps it there, so this event is the one that tells you, not the order state change. Register it with the TRAVEL_RULE_STATUS_CHANGE webhook type.

This event and status_change are sent apart, so they can arrive in either order, and a retried delivery can arrive minutes later (for example, the order CANCELED and its declaration CANCELED). The current status of the declaration is always travel_rule_declaration.status in GET /fiat_gateway/orders/{order_id}.

Read about the signature on Webhooks Signature section.

Signature version: V2

header Parameters
Content-Type
string
Example: application/json
X-FB-SIGNATURE
string
Example: 5036374ab971a06a17d3867242957eebf52666524bf218f7a73447ad41ab25c4
Request Body schema: application/json
event_id
required
string <uuid>

Unique ID of the event (UUID v4). It is the same on every retry of the delivery, while timestamp changes on every attempt: deduplicate by it, skipping an event_id you already processed. See the retries in Gateway webhooks.

timestamp
required
number

Time of this delivery attempt, in milliseconds since the Unix epoch. It changes on every retry; use event_id to deduplicate

webhook_type
required
string

Webhook type

required
object

Responses

Request samples

Content type
application/json
{
  • "event_id": "3f1c9a52-7d4e-4b8a-9c2f-6e1d0a7b5c34",
  • "timestamp": 1709234676472,
  • "webhook_type": "travel_rule_status_change",
  • "data": {
    }
}

Create webhook No sub-member needed

Create a webhook for monitoring gateway events
Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
Request Body schema: application/json
required
webhook_type
string
Enum: "GENERAL" "STATUS_CHANGE" "REFUND_ALERT" "TRAVEL_RULE_STATUS_CHANGE"

The type of trigger used to fire the webhook

url
string

The URL to receive the webhook events

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "uuid": "9329771d-204a-4d65-a409-541532c2cc25",
  • "webhook_type": "STATUS_CHANGE",
  • "secret": "9329771d-204a-4d65-a409-541532c2cc25",
  • "created_at": "2022-02-20T13:25:59Z"
}

List webhook No sub-member needed

List webhooks
Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)

Responses

Response samples

Content type
application/json
{}

Delete webhook No sub-member needed

Delete a Foxbit Gateway webhook
Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
uuid
required
string

Responses

Gateway Ordering (Beta)

Tools to help you integrate with Foxbit's API.

The Gateway Ordering Integration section provides detailed guidelines on how to integrate your system with the Foxbit Gateway to facilitate seamless order processing.

It is not possible to execute real deposits, orders, or other transactions in non-production environments. To enable full-cycle integration testing, including webhooks, we provide a set of tools described below.

Behavior simulations

To simulate some behaviors and allow full-cycle testing, there are special codes that must be passed in the order creation payload.

Code Description Usage
SUCCESS_CRYPTO_DEPOSIT Simulates a process that demands a crypto deposit. Off-ramp
SUCCESS_FIAT_DEPOSIT Simulates a process that demands a FIAT deposit. On-ramp
REFUND_DEPOSIT Simulates a process that demands a refund. On-ramp, Off-ramp

If you are creating an on-ramp order (side = BUY), the substituted field must be the receive_address.

// Example
{
  // ... payload,
  "receive_address": "SUCCESS_FIAT_DEPOSIT"
}

If you are creating an off-ramp order (side = SELL), the substituted field must be the bank.code.

// Example
{
  // ... payload,
  "bank": {
    "code": "SUCCESS_CRYPTO_DEPOSIT",
    // ...payload
  }
}

These codes are intended for sandbox environments only and are not supported in production.

RFQ overview

Before you start. Markets and quotes need no sub-member; executing a quote (POST /rfq/quotes/execute) requires the sub_member_sn that executes it, in the request body; create one in Registration.

👉 Start with the RFQ getting started guide.

What it is. Request-for-Quote (RFQ) gives a firm, time-limited price for a buy or sell on behalf of a sub-member: you request a quote, then execute it. Foxbit settles the trade internally and notifies you by webhook.

Who it's for. Partners who want quote-then-execute pricing rather than placing orders on the order book. It is the recommended way to trade for a sub-member.

Prerequisites. Requires the Sub-members product — every quote is executed for a sub-member, which must hold the asset being traded (FIAT for a buy, crypto for a sell). How the sub-member is funded follows the arrangement agreed for your account — talk to your account manager if you are unsure which applies to you. See the RFQ getting started guide.

Don't confuse with. To add FIAT to a sub-member, use cash-in from your root (or a Foxbit-provisioned PIX key) — not the Fiat Gateway PIX (a separate product), and not Deposits (crypto only).

Quote lifecycle

A quote moves through the following status values:

StatusMeaning
CREATEDThe quote was generated with a firm price, valid until valid_until. Execute it before it expires.
PENDINGExecution is in progress.
FILLEDExecuted successfully.
ERRORThe quote or execution failed — see fail_reason (Fail Reasons).

A quote that is not executed before valid_until can no longer be filled — request a new one. When reconciling, always match by quote_id (and your own client_order_id) together with status, rather than assuming a result from timing.

Estimated vs. executed values

Before execution the quote carries estimates; after execution it carries the real figures. Don't reconcile against the estimated fields:

FieldMeaning
price / amount / quantityEstimated price, quote-currency amount and base-asset quantity. May change at execution time.
estimated_feeApproximate fee, subject to change.
quantity_executedActual base-asset volume traded after execution.
fee_paidActual fee charged at execution.
client_order_idYour external ID, echoed back to link the quote to your own records.

For the maximum order size and market availability, see Markets and Limits.

Webhooks. Quote status changes are delivered via RFQ webhooks.

RFQ getting started

Recommended end-to-end flow for Request-for-Quote.

  1. Have a sub-member ready — RFQ requires the Sub-members product. If you don't have one yet, follow Sub-members getting started first.
  2. Make sure the sub-member has FIAT — funding follows the arrangement agreed for your account; where you fund the sub-member yourself, use cash-in. (FIAT funding uses cash-in or a Foxbit-provisioned PIX key; Deposits is crypto-only.)
  3. Request a quote — see Market Quotation.
  4. Execute the quote — confirm to execute the buy/sell.
  5. Receive the result — subscribe to RFQ webhooks; on failures inspect the Fail Reasons.

⚠️ Common mistake: Do not use the Fiat Gateway PIX to fund an RFQ sub-member — Gateway PIX is a separate, partner-level product for collecting third-party payments and will not credit the sub-member. To add FIAT to a sub-member, use cash-in from your root (or a Foxbit-provisioned PIX key for the sub-member). Sub-members → Deposits is for crypto only.

Market Quotation

RFQ (Request for Quote) endpoints for creating, listing and executing quotes on behalf of sub-members.

Find by quote_id No sub-member needed

This route allows to list executed quotes on the Foxbit exchange based on the quote_id parameter. By making a request to this route with the desired "quote_id", the quote with this ID will be returned
Rate Limit: 30 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
quoteId
required
string
Example: f54e260d-55e0-4011-94db-758f19a3f9c0

Unique ID of the quote that was previously generated by the quote generation API

Responses

Response samples

Content type
application/json
{
  • "quote_id": "990e4524-a27d-40c4-9f8a-994a62c7486a",
  • "client_order_id": "123456",
  • "market_symbol": "usdtbrl",
  • "price": "11.9892",
  • "amount": "4.1704",
  • "quantity": "0.001",
  • "fee_paid": "0.01",
  • "quantity_executed": "0.01",
  • "side": "BUY",
  • "fail_reason": "Failed to create transfer",
  • "created_at": "2022-02-18T22:06:32.999Z",
  • "status": "CREATED"
}

Find all quotes No sub-member needed

This route returns all executed quotes on the Foxbit exchange. By making a request to this route, a list of all executed quotes will be returned. This information can be used for record keeping and control purposes by API users
Rate Limit: 4 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
query Parameters
start_time
string
Example: start_time=2022-02-01T22:06:32.999Z

Filter values after this start_time, must be in ISO-8601 UTC. The range between start_time and end_time is limited to 90 days

end_time
string
Example: end_time=2022-02-18T22:06:32.999Z

Filter values before this end_time, must be in ISO-8601 UTC. The range between start_time and end_time is limited to 90 days

page_size
number [ 1 .. 100 ]
Default: 10
Example: page_size=10

The number of entries returned, maximum of 100

page
number >= 1
Deprecated
Default: 1
Example: page=1

Page to be retrieved from the list

after
string
Example: after=f54e260d-55e0-4011-94db-758f19a3f9c

Cursor that returns entries older than the given ID

before
string
Example: before=f54e260d-55e0-4011-94db-145a57p43tf

Cursor that returns entries newer than the given ID

Responses

Response samples

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

Create quote No sub-member needed

This API allows you to generate a quote for a buy or sell order of cryptocurrencies on the Foxbit exchange
Rate Limit: 260 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
Request Body schema: application/json
required
One of
side
required
string
Enum: "BUY" "SELL"

Quote side

market_symbol
required
string

Market quote to order

amount
required
string

Amount of the quote currency (eg. BRL) that will be bought or sold

Responses

Request samples

Content type
application/json
Example
{
  • "side": "BUY",
  • "market_symbol": "btcbrl",
  • "amount": "100.00"
}

Response samples

Content type
application/json
{
  • "quote_id": "990e4524-a27d-40c4-9f8a-994a62c7486a",
  • "side": "BUY",
  • "market_symbol": "usdtbrl",
  • "amount": "4.1704",
  • "quantity": "50.00",
  • "price": "11.9892",
  • "estimated_fee": "0.01",
  • "valid_until": "2023-05-03T23:16:39.249Z"
}

Execute quote Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the request body); create one in Registration.

This API allows for the execution of a previously generated quote by Foxbit's quote generation API
Rate Limit: 2 requests per 2 seconds.

Rejected executions: the reason is returned as a single-string array in error.details. error.message is the generic text of the HTTP status and error.code repeats that status, so neither carries the reason — always read error.details. Other validation errors are possible, but the status and message pairs below are part of the contract and are safe to branch on:

  • 422 This quote is expired. — the quote reached its valid_until without being executed.
  • 422 This quote has already been executed. — this quote_id was already executed and its order exists. Retrying the same quote_id never creates a second order.
  • 404 This quote does not exists. — this quote_id is not available for execution.
  • 500 Could not verify the quote state. Please try again. — we could not determine whether this quote_id had already been executed. The execution may or may not exist: retry the same quote_id (it never creates a second order) or check it with GET /rfq/quotes/{quoteId}. Do not treat it as a definitive failure.
Before reversing an operation on your side, confirm the outcome with GET /rfq/quotes/{quoteId}: a rejected execute request does not by itself prove that no order was created.

Authorizations:
(ApiKeyApiTimestampApiSignature)
Request Body schema: application/json
required
quote_id
required
string

Alphanumeric unique identifier of the quote

sub_member_sn
required
string

Internal user that executes the quotation

client_order_id
string

External ID provided by the partner to link the quote to a record in their own system

price
string

The price returned on quote creation

Responses

Request samples

Content type
application/json
{
  • "quote_id": "990e4524-a27d-40c4-9f8a-994a62c7486a",
  • "sub_member_sn": "WBZYUBF73C4GUU",
  • "client_order_id": "123456",
  • "price": "11.9892"
}

Response samples

Content type
application/json
{
  • "quote_id": "990e4524-a27d-40c4-9f8a-994a62c7486a",
  • "client_order_id": "123456",
  • "market_symbol": "usdtbrl",
  • "price": "11.9892",
  • "amount": "4.1704",
  • "quantity": "0.001",
  • "estimated_fee": "0.01",
  • "side": "BUY",
  • "created_at": "2022-02-18T22:06:32.999Z",
  • "status": "CREATED"
}

Markets and Limits

Endpoints for listing the markets available for RFQ operations and their trading limits.

Find by symbol No sub-member needed

This route allows the client to find the cryptocurrency market by its symbol, as well as its limits
Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
symbol
required
string
Example: usdt

Symbol of the currency

Responses

Response samples

Content type
application/json
{
  • "symbol": "btcbrl",
  • "name": "BTC/BRL",
  • "base": {
    },
  • "quote": {
    },
  • "limits": [
    ]
}

List all markets No sub-member needed

This route allows the client to list the cryptocurrency markets enabled for operation at Foxbit, as well as their limits
Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)

Responses

Response samples

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

RFQ webhooks

For insights into our webhook functionality and implementing security verification, refer to the dedicated webhook section.

This section provides detailed information on configuration, usage, and best practices related to webhooks on our platform.

Every webhook request is wrapped in the following envelope and signed with the V2 signature (see Webhooks Signature):

{
  "event_id": "3f1c9a52-7d4e-4b8a-9c2f-6e1d0a7b5c34",
  "webhook_type": "quote_status_change",
  "timestamp": 1708968361000,
  "data": { ... }
}

event_id identifies the event and is the same on every retry of its delivery; timestamp is the time of each attempt, in milliseconds. The payload can gain new fields: validate the signature over the raw body and ignore the fields you do not use (see Webhooks Signature).

Delivery and retries

A delivery fails when your endpoint answers with a status other than 2xx, does not answer within 10 seconds, cannot be reached (for example, connection refused or a DNS failure), or answers with a body over 64 KiB. Redirects are followed and only the final answer counts; a 301, 302 or 303 redirect turns the POST into a GET without the body, so register the final URL of your endpoint. A failed delivery is retried, up to 4 attempts in total:

AttemptWait after the previous failure
1stInstant
2nd4 minutes
3rd8 minutes
4th (last)16 minutes

The 4th attempt comes about 28 minutes after the 1st. After the 4th failed attempt the event is not sent again. The current status of a quote is always in GET /rfq/quotes/{quoteId}.

Every attempt carries the same event_id, while timestamp, and with it the signature, changes on each one. A delivery can arrive more than once, for example when your endpoint processed it but answered after 10 seconds. Store the event_id of each webhook you process and, when it arrives again, answer 2xx without processing it again. A retried delivery can also arrive after a later event, so do not rely on the order of arrival.

Answer as soon as the webhook is stored and do the processing afterwards. Foxbit does not read the response body.

RFQ state change Webhook

Triggered when a quote has the status changed.

Read about the signature on Webhooks Signature section.

Signature version: V2

header Parameters
Content-Type
string
Example: application/json
X-FB-SIGNATURE
string
Example: 5036374ab971a06a17d3867242957eebf52666524bf218f7a73447ad41ab25c4
Request Body schema: application/json
event_id
required
string <uuid>

Unique ID of the event (UUID v4). It is the same on every retry of the delivery, while timestamp changes on every attempt: deduplicate by it, skipping an event_id you already processed. See the retries in RFQ webhooks.

timestamp
required
number

Time of this delivery attempt, in milliseconds since the Unix epoch. It changes on every retry; use event_id to deduplicate

webhook_type
required
string

Webhook type

required
object

Responses

Request samples

Content type
application/json
{
  • "event_id": "3f1c9a52-7d4e-4b8a-9c2f-6e1d0a7b5c34",
  • "timestamp": 1709234676472,
  • "webhook_type": "quote_status_change",
  • "data": {
    }
}

Create webhook No sub-member needed

Create a webhook for monitoring RFQ quote events
Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
Request Body schema: application/json
required
webhook_type
string
Value: "QUOTE_STATUS_CHANGE"

The type of trigger used to fire the webhook

url
string

The URL to receive the webhook events

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "uuid": "9329771d-204a-4d65-a409-541532c2cc25",
  • "webhook_type": "QUOTE_STATUS_CHANGE",
  • "secret": "9329771d-204a-4d65-a409-541532c2cc25",
  • "created_at": "2022-02-20T13:25:59Z"
}

List webhooks No sub-member needed

List created RFQ webhooks.
Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)

Responses

Response samples

Content type
application/json
{}

Delete webhook No sub-member needed

Delete a RFQ webhook.
Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
uuid
required
string

Responses

Fail Reasons

This section provides a list of possible reasons for RFQ quote failure returned by the API.

When a quote moves to the ERROR state, the response contains a fail_reason field. This field includes a textual reason that helps explain why the operation could not be completed.

Note that fail_reason is not a closed list: besides the common values below, it may contain other validation messages describing the failure.

Some Common Fail Reasons

Description
Failed to create transfer to root and the job reached max attempts
Failed to create transfer to submember
Failed to create order
Order was canceled
Failed to complete the order
Maximum number of attempts has been reached

Blocktrade overview

Before you start. Listing and simulating quotes need no sub-member; creating, executing and looking up a quote act on an existing sub-member (sub_member_sn in the path); create one in Registration.

What it is. Blocktrade gives a firm, time-limited price for a buy or sell on behalf of a sub-member. The integration takes three calls: you request a quote, execute it, and then follow the operation until it settles.

Prerequisites. Requires the Sub-members product — every operation except the quote listing and the price simulation is scoped to the sub-member in the path, which must hold the asset being traded (FIAT for a buy, crypto for a sell). How the sub-member is funded follows the arrangement agreed for your account — talk to your account manager if you are unsure which applies to you. Your account must be enabled for Blocktrade, and the API key that executes a quote needs the trade permission.

Authentication. The same as the rest of the partner API. On the routes with a sub-member, the sub_member_sn is part of the path, and the path is part of the signed text: sign the full path, including the sub-member segment, or the request answers 401.

Price simulation. To show a price before trading, call POST /blocktrade/quotes/simulate with the same body as step 1 and no sub-member in the path. It answers the estimated price, quantity and amount with the conditions of your account, and creates nothing: there is no quote_id and no valid_until, so a simulation cannot be executed. To price for one of your sub-members, such as one in a spread group, send its sub_member_sn in the body: the simulation then answers what step 1 would answer for that sub-member.

Flow

StepCallWhat you get
1POST /sub_member/{sub_member_sn}/blocktrade/quotesA quote with a firm price, an identifier and a validity (valid_until)
2POST /sub_member/{sub_member_sn}/blocktrade/quotes/executeThe confirmation that the execution was registered
3GET /sub_member/{sub_member_sn}/blocktrade/quotes/{quote_id}The current state of the operation, until FILLED, ERROR or CANCELED

⚠️ The execution is asynchronous. Step 2 confirms that the execution was registered, not that it settled — that is why it always answers status: "CREATED". The settlement result comes from step 3. An integration that expects FILLED on the execute response will read every operation as incomplete.

Each quote is valid for a few seconds: request and execute it in sequence, in the same routine — do not store quotes to use later.

Step 3 can be replaced by the Blocktrade WebSocket channel or by the Blocktrade webhook, which deliver each state change as it happens. Both are optional, and the lookup remains the recovery path.

Quote history. To reconcile, call GET /blocktrade/quotes, with no sub-member in the path. It lists the quotes executed on your account in a period, most recent first: each item is what the lookup answers for the execution, plus the sub_member_sn that executed it. A quote that was never executed is not listed. Bound the period with start_time and end_time, which filter the created_at of the execution in whole seconds, both ends included: sent together, they span up to 90 days and end_time cannot be in the future; either one sent alone has no limit. A cursor that matches none of your quotes, or another sub-member's quote when sub_member_sn is sent, answers 404, as on GET /rfq/quotes; a sub_member_sn that is not one of your sub-members answers 400.

Operation states

StateTerminalMeaning
CREATEDNoThe execution was registered and is queued
PENDINGNoThe settlement is in progress
FILLEDYesThe operation was completed successfully
ERRORYesThe operation failed — see fail_reason (Blocktrade fail reasons)
CANCELEDYesThe operation was canceled

The typical sequence is CREATED → PENDING → FILLED, within a few seconds. Treat a state you do not recognize as non-terminal and keep looking it up.

Timeouts and retries

If the execute call does not answer, or answers 500 or 503, its outcome is unknown: the execution may have been registered before the answer was lost. Look the quote up instead of retrying: retrying with the same client_order_id answers 409, and retrying with a new one risks executing the operation twice.

A 4xx response is final: that request registered nothing. Two of them point to an earlier execute that was registered, so look the quote up instead of requesting a new one: 409 (an execute with the same client_order_id) and 422 This quote has already been executed.

Errors

Every error has the same envelope:

{
  "error": {
    "message": "Invalid data sent.",
    "code": 422,
    "details": ["This quote is expired."]
  }
}

Decide on the HTTP status and the content of details. The message field is generic per category and repeats across different situations.

HTTPdetails[0]When it happens
400The message of the invalid fieldMissing field, wrong type or out of bounds — e.g. a quote_id that is not a UUID, or a client_order_id longer than 36 characters. On the listing, also a range above 90 days, an end_time in the future sent with a start_time, after combined with before, or a sub_member_sn that is not one of your sub-members
401The signature for this request is not valid.Wrong signature, key or timestamp
403Permission denied for this request. You have missing permissions.Your account is not enabled for Blocktrade
403Permission denied for this request. Check documentation to see the necessary API key roles.Execute only: the API key lacks the trade permission
404This quote does not exists.The quote does not exist, belongs to another partner, or belongs to another sub-member — including one of yours, when the sub_member_sn in the path did not create the quote
404Resource not foundListing only: the cursor matches none of your quotes, or another sub-member's quote when sub_member_sn is sent
405Custody member is not allowed.The sub-member cannot trade; on a simulation without sub_member_sn, your account cannot trade; on the listing, your account holds custody only or cannot create orders
409This client order id has already been used.Repeated client_order_id
422This quote is expired.The quote is past its valid_until
422This quote has already been executed.The quote was already executed
422Could not reserve member funds.Insufficient sub-member balance
422Sub member SN does not match with the corresponding quote.The sub-member in the path is not the one that created the quote
422Counterparty unavailable.The counterparty is unavailable at the moment
422Regulated market is not allowed.The market is not allowed in this flow
422This market is not available for this account.The market is not enabled for your account
422This account is not available for this operation.The account cannot be used for this operation; contact support
422Partner account not found.Your partner account could not be found for this operation; contact support
422Could not prepare the account for this operation.The operation could not be prepared; if it persists, contact support with the time and the quote_id
422Failed to create transfer to submember.The transfer to the sub-member failed; if it persists, contact support with the time and the quote_id
422The request could not be processed by the quote engine.Uncategorized refusal; if it persists, contact support with the time and the quote_id
428RFQ OTC is not enabled.The flow is not enabled for your account
428Orderbook is in maintenance or empty.No liquidity available at the moment
429—Rate limit exceeded (see each endpoint)
500An unknown error occurred while processing the request.Unexpected error, including a timeout while executing. On create, request a new quote; on a simulation, simulate again; on the listing, list again; on execute, look the quote up before deciding (see Timeouts and retries)
503Exchange API is not available.Temporarily unavailable. On create, request a new quote; on a simulation, simulate again; on the listing, list again; on execute, look the quote up before deciding (see Timeouts and retries)

Integration recommendations

  • Values are decimal strings. Prices, quantities and amounts come as strings to preserve precision. Parse them as decimals, never as floating point.
  • One client_order_id per operation. Generate a unique identifier (up to 36 characters) and persist it before calling execute: it is your reconciliation key and your protection against a duplicate execution.
  • Request and execute in sequence. The validity is a few seconds and comes in valid_until.
  • Simulate to show a price, create to trade. A simulation reserves nothing and cannot be executed; create the quote only when the client decides to trade.
  • Follow the operation to a terminal state on the lookup, within its rate limit, or subscribe to the Blocktrade WebSocket or register the Blocktrade webhook, and keep the lookup for reconciliation.
  • Record the quote_id of every operation. It is the key for any investigation with support.
  • Reconcile in bulk on the listing. List the quotes executed in a period to confirm the state of each one, instead of looking them up one by one; the lookup stays the path for a single quote.
  • New fields may appear in the responses. Ignore what you do not recognize instead of rejecting the response.

Blocktrade quotes

List the quotes executed on your account, simulate a price with the conditions of your account, and create, execute and look up Blocktrade quotes on behalf of a sub-member. Read the Blocktrade overview first: the execution is asynchronous.

Create Blocktrade quote Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Generate a firm, time-limited quote for a buy or sell on behalf of a sub-member. Send either amount or quantity; when both are sent, amount prevails. Execute the quote before valid_until, in the same routine: it is valid for a few seconds only

Rate Limit: 260 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: WBZYUBF73C4GUU

Serial number of the sub-member the operation is scoped to

Request Body schema: application/json
required
side
required
string
Enum: "BUY" "SELL"

Quote side

market_symbol
required
string

Market quote to order

amount
string

Amount of the quote currency (eg. BRL) that will be bought or sold

quantity
string

Quantity of base currency (eg. BTC) to be bought or sold

Responses

Request samples

Content type
application/json
{
  • "side": "BUY",
  • "market_symbol": "btcbrl",
  • "amount": "100.00",
  • "quantity": "0.001"
}

Response samples

Content type
application/json
{
  • "quote_id": "990e4524-a27d-40c4-9f8a-994a62c7486a",
  • "side": "BUY",
  • "market_symbol": "usdtbrl",
  • "amount": "4.1704",
  • "quantity": "50.00",
  • "price": "11.9892",
  • "estimated_fee": "0.01",
  • "valid_until": "2023-05-03T23:16:39.249Z"
}

Execute Blocktrade quote Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Execute a previously created quote, under the same sub-member that created it. The execution is asynchronous: the response confirms it was registered, so status is always CREATED. Follow the result on the quote lookup, or on the Blocktrade WebSocket channel, until FILLED, ERROR or CANCELED.

On a timeout, a 500 or a 503, look the quote up instead of retrying: the execution may have been registered. Retrying with the same client_order_id answers 409; retrying with a new one risks executing twice

Required API Key permissions: trade

Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: WBZYUBF73C4GUU

Serial number of the sub-member the operation is scoped to

Request Body schema: application/json
required
quote_id
required
string

Alphanumeric unique identifier of the quote

client_order_id
string <= 36 characters

External ID provided by the partner to link the quote to a record in their own system

price
string

The price returned on quote creation. Ignored: the engine prices the quote

Responses

Request samples

Content type
application/json
{
  • "quote_id": "990e4524-a27d-40c4-9f8a-994a62c7486a",
  • "client_order_id": "123456",
  • "price": "11.9892"
}

Response samples

Content type
application/json
{
  • "quote_id": "990e4524-a27d-40c4-9f8a-994a62c7486a",
  • "client_order_id": "123456",
  • "market_symbol": "usdtbrl",
  • "price": "11.9892",
  • "amount": "4.1704",
  • "quantity": "0.001",
  • "estimated_fee": "0.01",
  • "side": "BUY",
  • "created_at": "2022-02-18T22:06:32.999Z",
  • "status": "CREATED"
}

Find Blocktrade quote by id Requires sub-member

Requires sub-member. Acts on an existing sub-member (sub_member_sn in the path); create one in Registration.

Retrieve the current state of an executed quote. Poll it until a terminal state (FILLED, ERROR or CANCELED); an interval of 1 to 2 seconds is enough, since the settlement takes a few seconds.

A quote is only returned under the sub_member_sn that created it: a quote that does not exist, belongs to another partner or belongs to another of your sub-members answers the same 404

Rate Limit: 30 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
sub_member_sn
required
string
Example: WBZYUBF73C4GUU

Serial number of the sub-member the operation is scoped to

quote_id
required
string
Example: 990e4524-a27d-40c4-9f8a-994a62c7486a

Unique ID of the quote returned on creation

Responses

Response samples

Content type
application/json
{
  • "quote_id": "990e4524-a27d-40c4-9f8a-994a62c7486a",
  • "client_order_id": "123456",
  • "market_symbol": "usdtbrl",
  • "price": "11.9892",
  • "amount": "4.1704",
  • "quantity": "0.001",
  • "fee_paid": "0.01",
  • "side": "BUY",
  • "created_at": "2022-02-18T22:06:32.999Z",
  • "status": "FILLED",
  • "fail_reason": "lock_member_funds_failed"
}

List Blocktrade quotes No sub-member needed

Optional sub-member. Pass sub_member_sn to scope this to a sub-member.

List the quotes executed on your account in a period, most recent first. Each item is what the quote lookup answers for the execution, plus the sub_member_sn that executed it. A quote that was never executed is not listed.

Bound the period with start_time and end_time, which filter created_at, the instant the execution was registered. The period is applied in whole seconds and includes both ends: an end_time of 12:00:10.250Z takes in everything up to 12:00:10.999Z. Sent together, they span up to 90 days and end_time cannot be in the future; either one sent alone has no limit. Narrow the list to one sub-member with sub_member_sn, and walk the pages with the cursors in pagination. A cursor must come from a previous response: one that matches none of your quotes, or another sub-member's quote when sub_member_sn is sent, answers 404, as on GET /rfq/quotes. A sub_member_sn that is not one of your sub-members answers 400.

Rate Limit: 4 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
query Parameters
start_time
string
Example: start_time=2026-11-01T00:00:00.000Z

Lower bound of created_at, in ISO-8601 UTC, inclusive and applied in whole seconds. With end_time, the range is limited to 90 days; sent alone, it has no limit

end_time
string
Example: end_time=2026-11-20T23:59:59.999Z

Upper bound of created_at, in ISO-8601 UTC, inclusive of its whole second. Sent with start_time, it cannot be in the future: a value after the current time answers 400. Sent alone, it is not checked against the current time

page_size
integer [ 1 .. 100 ]
Default: 10
Example: page_size=10

Entries per page, from 1 to 100

after
string
Example: after=990e4524-a27d-40c4-9f8a-994a62c7486a

Cursor for the next page (older quotes): the quote_id in pagination.after. Cannot be combined with before. One that matches none of your quotes, or another sub-member's quote when sub_member_sn is sent, answers 404, as on GET /rfq/quotes

before
string
Example: before=5e955aa3-2d5a-48d1-9a75-7f69f4145e4b

Cursor for the previous page (newer quotes): the quote_id in pagination.before. Cannot be combined with after. One that matches none of your quotes, or another sub-member's quote when sub_member_sn is sent, answers 404, as on GET /rfq/quotes

sub_member_sn
string
Example: sub_member_sn=WBZYUBF73C4GUU

Narrows the list to the quotes of one of your sub-members; an SN that is not one of them answers 400

Responses

Response samples

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

Simulate Blocktrade quote No sub-member needed

Optional sub-member. Pass sub_member_sn to scope this to a sub-member.

Estimate the price of a buy or sell without creating a quote. Send the same body as Create Blocktrade quote: either amount or quantity; when both are sent, amount prevails.

Without sub_member_sn, the simulation uses the commercial conditions of your account. With the sub_member_sn of one of your sub-members, it uses the conditions of that sub-member, such as its spread group, and answers what the create would answer for it, refusals included.

The price is indicative. The response carries no quote_id and no valid_until, so it cannot be executed: create a quote to trade.

Rate Limit: 260 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
Request Body schema: application/json
required
side
required
string
Enum: "BUY" "SELL"

Quote side

market_symbol
required
string

Market quote to order

amount
string

Amount of the quote currency (eg. BRL) that will be bought or sold

quantity
string

Quantity of base currency (eg. BTC) to be bought or sold

sub_member_sn
string

Serial number of one of your sub-members. When sent, the simulation uses the conditions of that sub-member and answers what its create would; without it, the conditions of your account

Responses

Request samples

Content type
application/json
{
  • "side": "BUY",
  • "market_symbol": "btcbrl",
  • "amount": "100.00",
  • "quantity": "0.001",
  • "sub_member_sn": "WBZYUBF73C4GUU"
}

Response samples

Content type
application/json
{
  • "side": "BUY",
  • "market_symbol": "usdtbrl",
  • "amount": "4.1704",
  • "quantity": "50.00",
  • "price": "11.9892",
  • "estimated_fee": "0.01"
}

Blocktrade WebSocket

The blocktrade channel delivers each state change of an operation as it happens, instead of repeating the quote lookup. It is optional: the lookup remains the source of truth and the recovery path.

wss://api.foxbit.com.br/ws/v3/business

What the channel delivers. One message per state change of the operations of your sub-members — the same states as the lookup (see Operation states), under the field state. It is not a price stream and does not distribute quotes: it tells you which state an executed operation is in.

Login

Every connection starts with a login frame; before it, any subscribe answers an error. The signature uses the same API key and secret as the REST API, over its own text: timestamp + "login", as hexadecimal HMAC-SHA256, with the timestamp in epoch milliseconds. The clock is checked: a difference above 30 seconds answers Invalid timestamp.

{
  "type": "login",
  "params": {
    "timestamp": 1757345678901,
    "api_key": "your-access-key",
    "signature": "<hex HMAC-SHA256 of 1757345678901login>"
  }
}
{
  "type": "login",
  "event": "success",
  "params": { "timestamp": 1757345678901, "api_key": "your-access-key", "signature": "..." },
  "data": { "authenticated": true }
}

⚠️ The shape of params changes between frames. On login it is an object; on subscribe, unsubscribe and message it is a non-empty array. A frame outside that shape, or with an unknown type, closes the connection (code 1008) — it is not an error you receive and ignore.

Enablement. The API key used to log in must be enabled to operate on behalf of sub-members. Without it the login answers User is not enabled to use this service; ask your Foxbit contact to enable it.

Subscribe

Two modes. All your sub-members, omitting sub_member_sn:

{ "type": "subscribe", "params": [{ "channel": "blocktrade" }] }

Or one sub-member, sending its sub_member_sn:

{ "type": "subscribe", "params": [{ "channel": "blocktrade", "sub_member_sn": "WBZYUBF73C4GUU" }] }

The confirmation echoes the parameters sent:

{ "type": "subscribe", "event": "success", "params": { "channel": "blocktrade", "sub_member_sn": "WBZYUBF73C4GUU" } }

To receive from all sub-members the field must be absent: a sub_member_sn sent as null, an empty string or a non-text value is refused — it is not read as "all". Omit the key.

unsubscribe mirrors subscribe in both modes and is idempotent: undoing a subscription that does not exist answers success with no effect.

The update event

FieldTypeDescription
params.channelstringblocktrade
params.sub_member_snstringThe sub-member the event belongs to
data.quote_idstringThe quote identifier — the same key as the execute and the lookup
data.client_order_idstring · nullThe identifier you sent on execute; null when none was sent
data.sub_member_snstringThe sub-member of the operation. When subscribed to all, it tells whose event it is
data.statestringThe current state of the operation
data.tsintegerEpoch milliseconds of the state change
data.fail_reasonstringPresent only on ERROR, and not always; see Blocktrade fail reasons
{
  "type": "subscribe",
  "event": "update",
  "params": { "channel": "blocktrade", "sub_member_sn": "WBZYUBF73C4GUU" },
  "data": {
    "quote_id": "990e4524-a27d-40c4-9f8a-994a62c7486a",
    "client_order_id": "order-000123",
    "sub_member_sn": "WBZYUBF73C4GUU",
    "state": "PENDING",
    "ts": 1757345678901
  }
}

The event carries no price, quantity or fee: those values are in the execute response and in the lookup. Only the state travels here.

How many events to expect

StateDelivered by the channel?When
CREATEDNoThe operation is born in this state and the channel emits on state changes. You have it in the execute response and in the lookup
PENDINGYesFirst message of every registered operation: the settlement started
FILLEDYesTerminal — completed
ERRORYesTerminal — failed; see fail_reason
CANCELEDYesTerminal — canceled

The typical sequence is two messages: PENDING and, a few seconds later, FILLED.

A refused execute produces no event. When the execute answers a 4xx error, the operation was not registered and nothing transitions: zero messages on the channel. The HTTP error is the final answer — do not wait for an ERROR on the socket for an operation the execute refused. A timeout, a 500 or a 503 is not a refusal: the operation may have been registered and its messages may arrive, so reconcile it on the lookup (see Timeouts and retries).

The same state may arrive more than once, and a connection subscribed in both modes at once receives every message twice. That is why the idempotency rule below is not optional.

Consumption rules

  • Be idempotent by (quote_id, state). Receiving the same state twice must not produce two effects in your system.
  • Discard an update whose ts is older than the last one applied for the same quote_id. There is no sequence number: ts is the order.
  • There is no redelivery. A message published while you were disconnected is not delivered later.
  • Reconcile on reconnect. Subscribing does not bring the current state. After logging in and subscribing again, look up every operation you hold in a non-terminal state — and only then resume applying what arrives on the socket.
  • A state you do not recognize: treat it as non-terminal and look it up.
  • New fields may appear in data. Ignore what you do not recognize instead of rejecting the message.
  • Keep the lookup path. The channel shortens the wait; it does not replace your time limit per operation. An operation with no terminal state within that limit is resolved on the lookup.

Connection

Keep-alive. The server does not send pings. Send yours — every 20 to 30 seconds is enough to keep the connection from being closed for inactivity somewhere along the way:

{ "type": "message", "params": [{ "channel": "ping" }] }
{ "type": "message", "event": "success", "params": { "channel": "ping" }, "data": { "message": "pong" } }

Reconnection. Reconnect with an increasing interval between attempts and repeat the whole sequence: login → subscribe → reconciliation on the lookup.

Limits. As in the REST API, they apply per origin identity:

LimitValue
Simultaneous connections30
New connections10 per 2 seconds
Frames sent10 per 2 seconds
Active subscriptions per connection50
Items per subscribe / unsubscribe frame25

These are the default values: your identity may have higher limits. Check with your Foxbit contact if you need more connections or subscriptions.

Channel errors

WebSocket errors do not use the REST error envelope: they arrive in the frame itself, with event: "error".

SituationAnswerEffect
subscribe before logindata.message: Unauthorized. You must login first.Nothing subscribed
Invalid key, secret or timestamp on logindata.message: Invalid API key · Invalid secret key · Invalid timestampNot authenticated
Origin IP outside the trusted list of the keydata.message: The IP address <ip> isn't on the trusted list for this API key.Not authenticated; the restriction is the same one configured for the REST API
Unknown channeldata.message: Channel not found.Nothing subscribed
sub_member_sn that does not exist, is not yours, or has an invalid formatmessage: Invalid sub member SN: '<sn>'Nothing subscribed
Momentary unavailability while validating the sub_member_snmessage: Could not resolve sub member SN '<sn>' right now, please retryNothing subscribed; repeat the subscribe
More than 50 subscriptions on the connectionerror.code: MAX_SUBSCRIPTIONS_REACHEDSubscription refused, connection kept
More than 25 items in the frameerror.code: MAX_SUBSCRIPTIONS_PER_MESSAGEConnection closed (1008)
Malformed frame or unknown typeevent: invalid-inputConnection closed (1008)

Blocktrade webhook

The SUB_MEMBER_BLOCKTRADE_QUOTE webhook delivers each state change of a Blocktrade operation to the address you register, without keeping a connection open. It carries the same events and the same data as the Blocktrade WebSocket channel. It is optional: the lookup remains the source of truth and the recovery path.

What it delivers

One event per state change of the operations of your sub-members, with the state under data.state:

StateDelivered by the webhook?When
CREATEDNoThe operation is born in this state; you have it in the execute response and in the lookup
PENDINGYesFirst event of every registered operation: the settlement started
FILLEDYesTerminal — completed
ERRORYesTerminal — failed; see fail_reason
CANCELEDYesTerminal — canceled

The typical sequence is two events: PENDING and, a few seconds later, the final state. CREATED is not sent, as on the WebSocket channel.

A refused execute produces no event. When the execute answers a 4xx error, that request registered nothing and produces no event. Two of them point to an earlier execute that was registered, whose events still arrive: 409 (an execute with the same client_order_id) and 422 This quote has already been executed. Look the quote up instead of requesting a new one. A timeout, a 500 or a 503 is not a refusal: the operation may have been registered and its events may arrive, so reconcile it on the lookup.

{
  "webhook_type": "submember_blocktrade_quote",
  "timestamp": 1763560800,
  "data": {
    "quote_id": "990e4524-a27d-40c4-9f8a-994a62c7486a",
    "client_order_id": "order-000123",
    "sub_member_sn": "WBZYUBF73C4GUU",
    "state": "FILLED",
    "ts": 1763560799734
  }
}

The event carries no price, quantity or fee: those values are in the execute response and in the lookup.

Registration

Register it with POST /sub_member/webhooks, sending your url and the webhook_type SUB_MEMBER_BLOCKTRADE_QUOTE. The registration belongs to your partner account and covers every sub-member: the sub_member_sn in data tells whose operation the event is about. There is one registration per type, and the url must use https with a public hostname. Keep the secret returned on creation: it signs every delivery. Listing and deleting work as for every sub-member webhook.

Delivery and retries

Answer with any 2xx within 10 seconds. Otherwise the delivery is retried 4 more times, 4, 8, 16 and 32 minutes after each failed attempt (about 1 hour in total), and then abandoned: there is no redelivery after the last attempt. The policy is the same as for every sub-member webhook.

timestamp is the time of the delivery attempt, in seconds, and changes on every retry. data.ts is the time of the state change, in milliseconds, and is the same on every attempt.

Consumption rules

  • Validate the signature over the raw body (X-FB-SIGNATURE, see Webhooks Signature) before interpreting the JSON.
  • Be idempotent by (quote_id, state). The same state may arrive more than once.
  • Order by data.ts, not by arrival. A PENDING whose first attempt failed arrives after the FILLED: discard an event whose data.ts is older than the last one applied for the same quote_id.
  • A state you do not recognize: treat it as non-terminal and look it up.
  • New fields may appear in data. Ignore what you do not recognize instead of rejecting the event.
  • Keep the lookup path. The webhook shortens the wait; it does not replace your time limit per operation. An operation with no final state within that limit is resolved on the lookup.

Webhook or WebSocket

Both deliver the same events with the same data: choose the one that fits your integration. If you use both, every state arrives on each channel, and the idempotency rule above covers it.

Blocktrade operation state change Webhook

Triggered on each state change of a Blocktrade operation of one of your sub-members — the same events as the Blocktrade WebSocket channel. Register it with the SUB_MEMBER_BLOCKTRADE_QUOTE webhook type.

Read about the signature on Webhooks Signature section.

Signature version: V2

header Parameters
Content-Type
string
Example: application/json
X-FB-SIGNATURE
string
Example: 5036374ab971a06a17d3867242957eebf52666524bf218f7a73447ad41ab25c4
Request Body schema: application/json
timestamp
required
number

Unix timestamp in seconds, stamped when this delivery attempt was sent

webhook_type
required
string

Webhook type

required
object

Responses

Request samples

Content type
application/json
{
  • "timestamp": 1763560800,
  • "webhook_type": "submember_blocktrade_quote",
  • "data": {
    }
}

Blocktrade fail reasons

When a Blocktrade operation ends in ERROR, the quote lookup and the WebSocket event carry a fail_reason: a stable identifier, suitable for programmatic use. It is present only on ERROR, and not always.

ValueMeaning
lock_member_funds_failedThe sub-member's balance could not be reserved
order_not_executedThe order was not executed by the counterparty
counterparty_unavailableThe counterparty was unavailable
partner_account_not_foundYour partner account could not be found for the operation
quote_expiredThe quote expired before the settlement
quote_already_executedThe quote had already been executed
quote_not_foundThe quote could not be found during the settlement
missing_valid_until · invalid_valid_untilThe validity of the quote could not be confirmed during the settlement
client_order_id_already_existsRepeated client_order_id
market_not_found · member_not_foundMarket or participant not found
same_account_executionOrigin and destination of the operation are the same account
creation_error · unexpected_errorInternal failure during the settlement

The list may grow. Treat an unknown value as a generic failure, without breaking your processing.

Payments overview

Before you start. These endpoints act on your partner account directly; no sub-member is involved.

What it is. Payments lets you bill and invoice your clients.

Who it's for. Partners charging their own clients for goods or services.

Prerequisites. None — Payments is an independent product.

Don't confuse with. Payments is billing/invoicing; it is not the Fiat Gateway PIX cash-in nor a sub-member deposit.

Webhooks. Billing and payment updates are delivered via Payment webhooks.

Billing

Foxbit Pay is a platform for generating cryptocurrency invoices. In this document, we present the API endpoints that enable the generation of charges through integration.
See more at foxbitbusiness.com.br/foxbit-pay.

Create a billing No sub-member needed

This endpoint allows users to create a new crypto charge via the Foxbit Pay API.
Required API Key permissions: trade

When you make a request to this endpoint, you are provided with the details required to generate a new billing invoice.

Travel Rule. Every billing carries a travel_rule_declaration of where the payment comes from. A payment from your customer is declared as THIRD_PARTY, with your customer in sender. The flat travel_rule block is no longer accepted and returns 422. A payment held for the Travel Rule analysis makes the billing wait for the decision without expiring; after the analysis, the rules of a late payment apply. Follow the analysis in the status of travel_rule_declaration on GET /payment/billing/{uuid} or in the billing_state_change webhook.

Rate Limit: 3 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
Request Body schema: application/json
required

Create billing with amount or quantity.

One of
name
required
string

The identification name of the billed entity. It's shown on dashboard to identify the billing

phone_number
string <= 15 characters

Phone number used for the billing. Although it's required, the purpose of this field is solely for creating the Whatsapp link

email
string

Email used for the billing and to send the link of payment

currency_symbol
required
string

The currency symbol which you want to bill. You can get the currencies and chain from the GET /currencies endpoint

client_billing_id
string

Client-provided identifier for the billing. This will be used in future versions for active update and check on client-side

expire_at
string

Determine when a billing expires, must be in ISO-8601 UTC and above 15 minutes from current time. If null, the default value is 24 hours post creation

chain
string

Identification of the network that will receive the payment. If not specified, it will be automatically assigned to the mainnet

referral
string

SN from referral member

required
DepositTravelRuleOwnPrivateWallet (object) or DepositTravelRuleOwnExchangeWallet (object) or DepositTravelRuleThirdPartyPrivateWallet (object) or DepositTravelRuleThirdPartyExchangeWallet (object)

Travel Rule declaration of where the payment comes from, required to create the billing. It is the body of a deposit Travel Rule declaration (one of the variants below, picked by wallet_owner and wallet_type). You are the merchant: a payment from your customer is declared as THIRD_PARTY, with your customer in sender; SELF is for a payment from your own wallet. The declaration is validated when the billing is created, before any payment and with no amount yet: purpose_description is therefore required wherever a variant marks it as mandatory above USD 50,000. operation_reason is asked only on the international paths, and there is no route yet that lists the codes a billing accepts; a code the Travel Rule does not take is refused with 422. A malformed body returns 400 naming each field; a declaration the Travel Rule refuses returns 422 Validation error. (code 4001), with details naming the fields. If the payment is held for the Travel Rule analysis, the billing waits for the decision and does not expire meanwhile

amount
required
string

The billing amount. If automatic conversion is enabled it will be based on the selected currency, if not it will be based on BRL

Responses

Request samples

Content type
application/json
Example
{
  • "name": "Satoshi Nakamoto",
  • "phone_number": "5531988880000",
  • "email": "[email protected]",
  • "currency_symbol": "btc",
  • "client_billing_id": "12345-67890",
  • "expire_at": "2022-05-10T00:00:00.000Z",
  • "chain": "eth",
  • "referral": "FEEWMCCBFIQKQB",
  • "travel_rule_declaration": {
    },
  • "amount": "20.0"
}

Response samples

Content type
application/json
{}

List billings No sub-member needed

This endpoint allows users to list all existing crypto charges with the option to apply filters using query params. It returns a list of all charges that match the specified criteria.
Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
query Parameters
page
number
Example: page=1

The current page

page_size
number
Example: page_size=10

Amount of billings per page

currency_symbol
string
Example: currency_symbol=BTC

The symbol of the base currency

status
string
Enum: "PROCESSING" "CONFIRMED" "REJECTED" "AWAITING_CONVERSION"

The status of the billing. You can pass more than 1, separated by comma

search_term
string
Example: search_term=Billing name

A string to find matching records

from_date
string
Example: from_date=2024-01-05T15:21:55.528Z

The start date for filtering the billings

to_date
string
Example: to_date=2024-01-05T15:21:55.528Z

The end date for filtering the billings

Responses

Response samples

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

Get a billing No sub-member needed

This endpoint allows you to get specific details of a crypto charge based on its UUID (unique identifier). By providing the UUID of the desired charge in the request URL, the full details of that charge will be returned in the response.
Rate Limit: 5 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
uuid
required
string
Example: f54e260d-55e0-4011-94db-758f19a3f9c0

The UUID (unique identifier) of the crypto charge you want to get details on. This UUID is provided when the charge is created and is unique for each charge.

Responses

Response samples

Content type
application/json
{
  • "uuid": "77958338-9c7d-49aa-af64-961afc2faa70",
  • "name": "Billing name",
  • "email": "[email protected]",
  • "phone": "5511000000000",
  • "to_value": "0.00005577",
  • "from_value": "1.0",
  • "received_amount": "0.00002",
  • "confirmed_at": "2022-11-18T18:46:24.432Z",
  • "expired_at": "2022-11-19T18:46:24.424Z",
  • "created_at": "2022-11-18T18:46:24.432Z",
  • "status": "PROCESSING",
  • "base_currency": "btc",
  • "quote_currency": "brl",
  • "fee": "0.0000018",
  • "fee_currency": "btc",
  • "travel_rule": {
    },
  • "travel_rule_declaration": {
    }
}

Accept partial payment No sub-member needed

This endpoint allows users to accept billings when a partial payment is received.
Required API Key permissions: trade

Rate Limit: 2 requests per 1 second.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
uuid
required
string
Example: f54e260d-55e0-4011-94db-758f19a3f9c0

The UUID (unique identifier) of the crypto charge you want to update on. This UUID is provided when the charge is created and is unique for each charge.

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Currencies

This endpoint allows users to obtain a listing of currencies and networks available on Foxbit Pay. It returns information about the supported currencies and the payment networks associated with those currencies.
See more at foxbitbusiness.com.br/foxbit-pay.

List currencies No sub-member needed

This endpoint allows users to obtain a listing of currencies and networks available on Foxbit Pay. It returns information about the supported currencies and the payment networks associated with those currencies.
Rate Limit: 3 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)

Responses

Response samples

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

Settings

Endpoints for retrieving and updating Foxbit Pay product settings, such as the automatic conversion of received funds.

Get product settings No sub-member needed

This endpoint allows users to see their own product settings.
Rate Limit: 1 request per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)

Responses

Response samples

Content type
application/json
{
  • "enable_conversion": true,
  • "convert_to": "BRL"
}

Update product settings No sub-member needed

This endpoint allows users to update their product settings.
Required API Key permissions: trade

Rate Limit: 1 request per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
Request Body schema: application/json
required
enable_conversion
boolean

If the conversion is enabled, your finished billings will be automatically converted to the currency set on convert_to field

convert_to
string
Enum: "BRL" "USDT"

Your finished billings will be automatically converted to the currency set on this field if enable_conversion is true

Responses

Request samples

Content type
application/json
{
  • "enable_conversion": true,
  • "convert_to": "BRL"
}

Response samples

Content type
application/json
{
  • "success": true
}

Payment webhooks

Endpoints for registering, listing and deleting Foxbit Pay webhooks.
Webhooks notify your system about billing status changes and received funds.

Confirmation and Rejection of Billing Webhook

Triggered when Foxbit Pay confirms or rejects a created billing.

Read about the signature on Webhooks Signature section.

Signature version: V2

header Parameters
Content-Type
string
Example: application/json
X-FB-SIGNATURE
string
Example: 5036374ab971a06a17d3867242957eebf52666524bf218f7a73447ad41ab25c4
Request Body schema: application/json
timestamp
required
number

Unix timestamp in seconds, stamped when this delivery attempt was sent

webhook_type
required
string

Webhook type

required
object

Responses

Request samples

Content type
application/json
{
  • "timestamp": 1709234676,
  • "webhook_type": "billing_state_change",
  • "data": {
    }
}

Deposit Receivement Webhook

Triggered when Foxbit Pay received and accepted a deposit.

Read about the signature on Webhooks Signature section.

Signature version: V2

header Parameters
Content-Type
string
Example: application/json
X-FB-SIGNATURE
string
Example: 5036374ab971a06a17d3867242957eebf52666524bf218f7a73447ad41ab25c4
Request Body schema: application/json
timestamp
required
number

Unix timestamp in seconds, stamped when this delivery attempt was sent

webhook_type
required
string

Webhook type

required
object

Responses

Request samples

Content type
application/json
{
  • "timestamp": 1747668664,
  • "webhook_type": "funds_receivement",
  • "data": {
    }
}

Create a webhook No sub-member needed

This endpoint allows users to register webhooks.
The generated secret will be used to generate the webhooks V2 signature.
The webhook V1 signature is deprecated and will be removed in the future.
For more information about webhooks, please visit the webhooks section.
Rate Limit: 2 requests per 10 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
Request Body schema: application/json
required
url
required
string

The URL to receive the webhook events

webhook_type
required
string
Enum: "billing_state_change" "funds_receivement"

The webhook type

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "id": "9329771d-204a-4d65-a409-541532c2cc25",
  • "webhook_type": "billing_state_change",
  • "secret": "9329771d-204a-4d65-a409-541532c2cc25"
}

List webhooks No sub-member needed

This endpoint allows users to list webhooks.
Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)

Responses

Response samples

Content type
application/json
{}

Delete webhook No sub-member needed

This endpoint allows users to delete a webhook.
Rate Limit: 2 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
uuid
required
string

Responses

Prediction Markets overview

Before you start. These endpoints act on your partner account directly; no sub-member is involved.

What it is. Prediction Markets lets you operate event-based markets, including market making and sub-account deposits/withdrawals.

Who it's for. Partners offering prediction-market products to their users.

Prerequisites. None — Prediction Markets is an independent product.

Don't confuse with. Its sub-account deposit/withdrawal endpoints are specific to Prediction Markets and are separate from the Sub-members product.

Events

Public endpoints for listing prediction events and their questions. These endpoints do not require API Key signing or private headers.

Get prediction event questions No sub-member needed

Retrieve all available questions for a specific prediction event.

Rate Limit: 6 requests per 1 second.

path Parameters
event_id
required
string
query Parameters
id
string
Example: id=QUESTION12

Filter by question id

state
string
Enum: "ACTIVE" "PENDING" "DISPUTE" "PAYOFF" "INACTIVE" "DONE"
Example: state=ACTIVE

Filter by question state

Responses

Response samples

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

Get prediction events No sub-member needed

Retrieve all available events for prediction.

Rate Limit: 10 requests per 1 second.

query Parameters
id
string
Example: id=EVENT12

Filter by event id

category_id
string
Example: category_id=SPOR125

Filter by prediction category id

state
Array of strings
Items Enum: "ACTIVE" "PENDING" "DISPUTE" "INACTIVE" "PAYOFF" "DONE"
Example: state=ACTIVE

Filter by event state(s)

Responses

Response samples

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

Create a prediction event No sub-member needed

Create a new prediction event with questions and markets.
Required API Key permissions: trade

Rate Limit: 6 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
Request Body schema: application/json
required
category_id
required
string

Category ID

name
required
string

Event name

description
required
string

Event description

image_url
string

Image URL

ended_at
string

Event end date

required
Array of objects (CreatePredictionEventQuestionRequest)

List of questions for the event

Responses

Request samples

Content type
application/json
{
  • "category_id": "CRIPTO68I",
  • "name": "What will happen before GTA VI?",
  • "description": "Events that could possibly happen before GTA VI launches.",
  • "ended_at": "2026-12-31T23:59:59Z",
  • "questions": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "event_id": "WHATWILLHA13J",
  • "questions": [
    ]
}

Update a prediction event No sub-member needed

Update an existing prediction event. Only fields present in the request body are updated.
Required API Key permissions: trade

Rate Limit: 3 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
event_id
required
string
Request Body schema: application/json
required
name
string

Event name

description
string

Event description

description_rules
string

Rules used to resolve the event

image_url
string

Image URL

started_at
string

Event start date in ISO-8601

ended_at
string

Event end date in ISO-8601

category_slug
string

Category slug

Responses

Request samples

Content type
application/json
{
  • "name": "Bitcoin above 100k",
  • "description": "Updated description",
  • "description_rules": "Updated resolution rules",
  • "started_at": "2026-05-01T00:00:00Z",
  • "ended_at": "2026-05-31T23:59:59Z",
  • "category_slug": "CATEGORYSLUG123T"
}

Response samples

Content type
application/json
{
  • "success": true
}

Update a prediction question No sub-member needed

Update an existing prediction question. Only fields present in the request body are updated.
Required API Key permissions: trade

Rate Limit: 3 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
question_id
required
string
Request Body schema: application/json
required
label
string

Question label or text

resolution_criteria
string

Description of the criteria used to resolve the question

Responses

Request samples

Content type
application/json
{
  • "label": "Which team will win the championship?",
  • "resolution_criteria": "The team that wins the championship by official broadcast"
}

Response samples

Content type
application/json
{
  • "success": true
}

Propose a prediction question resolution No sub-member needed

Propose a resolution for a prediction question, indicating the winning market and the resolution text.
Required API Key permissions: trade

Rate Limit: 3 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
question_id
required
string
Request Body schema: application/json
required
winner_market_symbol
required
string

Symbol of the market proposed as the winner

resolution_text
required
string

Text of the resolution proposed by the administrator

Responses

Request samples

Content type
application/json
{
  • "winner_market_symbol": "pred101brl",
  • "resolution_text": "Team A won the championship"
}

Response samples

Content type
application/json
{
  • "success": true
}

Sub-account Deposit

Transfer BRL from the user's main account to the Prediction Account.

The Prediction Account is a dedicated BRL sub-account created automatically for each user. This is the first step before operating in any prediction market.

Main Account (BRL) → Prediction Account (BRL)

Create a prediction market deposit No sub-member needed

Transfer funds from main account to prediction market account.
Required API Key permissions: deposit

Rate Limit: 3 requests per 1 second.

Authorizations:
(ApiKeyApiTimestampApiSignature)
Request Body schema: application/json
required
currency
required
string

Currency code to be transferred (e.g., "BTC", "BRL")

amount
required
string

Amount to be transferred

Responses

Request samples

Content type
application/json
{
  • "currency": "BRL",
  • "amount": "100.00"
}

Response samples

Content type
application/json
{
  • "success": true
}

Sub-account Withdrawal

Transfer BRL from the Prediction Account back to the user's main account.

Use this endpoint to move unused funds from the Prediction Account back to the main account.

Prediction Account (BRL) → Main Account (BRL)

Create a prediction market withdrawal No sub-member needed

Transfer funds from prediction market account to main account.
Required API Key permissions: withdraw

Rate Limit: 3 requests per 1 second.

Authorizations:
(ApiKeyApiTimestampApiSignature)
Request Body schema: application/json
required
currency
required
string

Currency code to be transferred (e.g., "BTC", "BRL")

amount
required
string

Amount to be transferred

Responses

Request samples

Content type
application/json
{
  • "currency": "BRL",
  • "amount": "100.00"
}

Response samples

Content type
application/json
{
  • "success": true
}

Market Making

Convert BRL from the Prediction Account into shares of a prediction question, or redeem shares back into BRL.

Each prediction question has multiple market options (e.g., "Yes" / "No"). When depositing shares, the BRL amount is debited from the Prediction Account, and the same quantity of shares is credited to every market option's share account. When withdrawing, the same amount of shares is redeemed from every option back into BRL.

Prediction Account (BRL) ⇄ Share Accounts (per market option)

Example

StepActionMain AccountPrediction AccountShares (Option A)Shares (Option B)
1Initial balanceR$ 100.00R$ 0.000.000.00
2Deposit R$ 50.00R$ 50.00R$ 50.000.000.00
3Share Deposit R$ 10.00R$ 50.00R$ 40.0010.0010.00
4Share Withdraw R$ 5.00R$ 50.00R$ 45.005.005.00
5Withdrawal R$ 45.00R$ 95.00R$ 0.005.005.00

Transfer BRL to prediction shares No sub-member needed

Transfer BRL from the Prediction Account BRL sub-account to share accounts for each market option of a prediction question.
Required API Key permissions: trade
Rate Limit: 6 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
question_id
required
string
Request Body schema: application/json
required
amount
required
string

Amount to be transferred

Responses

Request samples

Content type
application/json
{
  • "amount": "100.00"
}

Response samples

Content type
application/json
{
  • "success": true
}

Redeem prediction shares to BRL No sub-member needed

Transfer funds from share accounts of a prediction question back to the prediction BRL account.
Required API Key permissions: trade
Rate Limit: 6 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
question_id
required
string
Request Body schema: application/json
required
amount
required
string

Amount to be transferred

Responses

Request samples

Content type
application/json
{
  • "amount": "100.00"
}

Response samples

Content type
application/json
{
  • "success": true
}

Scheduled Partner Exports

Retrieve a download URL for a preconfigured, automated report covering a single calendar day.

How it works. Call the endpoint with the day (in YYYY-MM-DD format) and the report type; the response contains a URL to download the CSV file. A 404 response means the report for that day has not been generated (or the day has no data for that type) — retry once the day has closed. Timestamps in the API responses are in UTC.

Report types

Type Format Description
FULL_STATEMENT csv Contains all account movements of root and sub-members for the specified date.
ROOT_STATEMENT csv Contains all account movements of the root member only for the specified date.
RFQ_QUOTES_EXECUTIONS csv Contains all RFQ quote executions of all sub-members for the specified date.
BLOCKTRADE_QUOTES_EXECUTIONS csv Contains all Block Trade quote executions of the root member and its sub-members for the specified date, with the same columns as RFQ_QUOTES_EXECUTIONS.
ORDERS csv Contains all orders of all sub-members for the specified date.
TRADES csv Contains all trade movements for the root member and its sub-members on the specified date, including trades from sub-member portfolios.
ACCOUNT_SNAPSHOT csv A daily snapshot of account balances/positions for the specified date.

Which report should I use?

I need… Use
All account movements of root and sub-members for a day FULL_STATEMENT
Account movements of the root only for a day ROOT_STATEMENT
RFQ quote executions for a day RFQ_QUOTES_EXECUTIONS
Block Trade quote executions for a day BLOCKTRADE_QUOTES_EXECUTIONS
Orders placed by sub-members for a day ORDERS
Executed trades for a day (includes sub-member portfolio trades) TRADES
End-of-day balances/positions ACCOUNT_SNAPSHOT
A full financial ledger over a custom date range On-demand Exports (LEDGER_V1 / LEDGER_V2)

Note: Some report types may need to be enabled for your account. If one type returns an authorization error while others succeed, contact your account manager.

Get automated export download URL No sub-member needed

Returns a download URL for a preconfigured, automated export for partner accounts.
Rate Limit: 3 requests per 2 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
query Parameters
type
required
string
Enum: "RFQ_QUOTES_EXECUTIONS" "FULL_STATEMENT" "ORDERS" "ACCOUNT_SNAPSHOT" "ROOT_STATEMENT" "TRADES" "BLOCKTRADE_QUOTES_EXECUTIONS"

The type of report to generate the URL for

TypeDescription
FULL_STATEMENTAll account movements of the root member and sub-members
RFQ_QUOTES_EXECUTIONSAll RFQ quote executions of all sub-members
BLOCKTRADE_QUOTES_EXECUTIONSAll Block Trade quote executions of the root member and sub-members
ORDERSAll orders of all sub-members
ACCOUNT_SNAPSHOTEnd-of-day account snapshot
ROOT_STATEMENTAccount movements of the root member only
TRADESAll trades of the root member and sub-members, including portfolio trades

day
required
string
Example: day=2025-08-07

The day for which the report is requested, in YYYY-MM-DD format

Responses

Response samples

Content type
application/json
{}

On‑demand Exports

The On‑demand Exports endpoints allow members to create and retrieve custom account reports for any date range they need. This file will help you keep an accurate record of the operations.

Report Types

Type Description
LEDGER_V1 The complete financial ledger for a customer, including all trading and funding movements (V1 format). The same report format available for export within the platform.
LEDGER_V2 The complete financial ledger for a customer, including all trading and funding movements (V2 format). A new enhanced format that provides simplified data structure and improved standardization for easier integration and analysis.

LEDGER_V2 availability: data is available from 2024-11-01 onwards. Requests with a period starting before that date return an error.

Limits

  • A date range (start_time / end_time, ISO-8601) can cover a maximum of 12 months, and must be earlier than the current date.
  • Up to 2 exports in PENDING status per user at a time.
  • Up to 30 exports per user per month.

How to consume. Create an export (POST /reports/exports), then poll it by ID (GET /reports/exports/{id}) until its state becomes DONE — the response then includes file_url to download the file.

Report Structure

LEDGER_V1

The format is CSV, comma-separated, with one operation per line. The columns are as follows:

Field Description Allowed Values
email The account holder's email address. E.g. us**@example.com
operation_date The date and time when the operation was created (ISO 8601). E.g. 2025-10-21 12:03:00.849
operation The type of financial operation performed. E.g. Transferência Interna
base_currency The currency symbol of the asset being moved. E.g. BTC, ETH, USDT
base_amount The quantity moved in the base currency. E.g. 0.00005
fee The fee charged for the operation in base currency. E.g. 0.0
currency_price The market price at the time of operation. E.g. 600500.00
quote_amount The equivalent value in quote currency. If negative, means balance subtraction. E.g. 50.00
final_balance The account balance after the operation. E.g. 0.0001

LEDGER_V2

The format is CSV, comma-separated, with one operation per line. The columns are as follows:

Field Description Allowed Values
amount The amount of the operation. If negative, means balance subtraction. E.g. 0.0001
balance The account balance after the operation. E.g. 0.0002
created_at The date and time when the operation was created (ISO 8601). E.g. 2025-11-10 17:30:47.572
currency The currency symbol of the asset being moved. E.g. btc, eth, usdt
fee The fee charged for the operation. E.g. 0.00000101
locked Total balance currently held/locked in the account after the operation. E.g. 0.0001
locked_amount Variation of the locked balance in this specific operation. If negative, means balance unlock. E.g. 0.0001
reason_type The type of the operation's reason. TRADING
WITHDRAWING
DEPOSITING
INTERNAL_TRANSFERING
DUST_TRADING

Create an export No sub-member needed

Starts generating an on‑demand export with the configuration you send (report type and date range).

There are some rules to consider when creating report exports:

  • Maximum of 2 reports in pending status per user.
  • Maximum of 30 reports per user per month.
  • Exports can cover a maximum period of 12 months.

Rate Limit: 2 requests per 10 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
Request Body schema: application/json
required
type
required
string
Enum: "LEDGER_V1" "LEDGER_V2"

Type of report to be generated

start_time
required
string

Start date of the report period in ISO-8601 date format. Must be within 12 months difference from end_time and be less than the current date.

end_time
required
string

End date of the report period in ISO-8601 date format. Must be within 12 months difference from start_time and be less than the current date.

Responses

Request samples

Content type
application/json
{
  • "type": "LEDGER_V1",
  • "start_time": "2025-01-01",
  • "end_time": "2025-12-31"
}

Response samples

Content type
application/json
{
  • "id": "550e8400-e29b-41d4-a716-446655440000",
  • "state": "PENDING",
  • "created_at": "2025-11-19T11:22:40.405Z"
}

List exports No sub-member needed

Lists on-demand exports previously requested by the authenticated user.
Rate Limit: 3 requests per 10 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
query Parameters
page_size
number
Example: page_size=10

The number of entries returned, maximum of 100

after
string
Example: after=f54e260d-55e0-4011-94db-758f19a3f9c

Cursor that returns entries older than the given ID

before
string
Example: before=f54e260d-55e0-4011-94db-145a57p43tf

Cursor that returns entries newer than the given ID

state
string
Enum: "PENDING" "DONE"
Example: state=PENDING

The state of the report export

type
string
Enum: "LEDGER_V1" "LEDGER_V2"
Example: type=LEDGER_V1

The type of the report export

Responses

Response samples

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

Get an export by ID No sub-member needed

Retrieves a single export by ID, including its current status and, if completed, the download URL for the file.
Rate Limit: 3 requests per 10 seconds.

Authorizations:
(ApiKeyApiTimestampApiSignature)
path Parameters
id
required
string <uuid>

Report ID

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "type": "LEDGER_V1",
  • "start_time": "2025-10-01",
  • "end_time": "2025-10-31",
  • "done_at": "2025-11-04T13:53:21.650Z",
  • "state": "DONE",
  • "created_at": "2025-11-04T13:53:21.650Z"
}

OAuth and SSO

What it is. Foxbit supports OAuth-based authorization and Single Sign-On (SSO) so a partner's users can authenticate into Foxbit-related experiences through the partner's own identity flow, without sharing credentials.

Who it's for. Partners embedding Foxbit journeys (e.g. a hosted KYC or account flow) into their own product and wanting a seamless login for their end users.

How to get access. OAuth/SSO integration is enabled per partner and configured together with Foxbit — client credentials, redirect URIs and scopes are exchanged during onboarding. Contact your account manager to start the setup; the integration walkthrough is provided at that point.

Internal Transfer

Create an internal transfer No sub-member needed

Creates an internal transfer to another member.
Required API Key permissions: withdraw

The API accepts recipient identification via SN or via a combination of email and tax ID number. For consistency and best user experience, we recommend using the recipient's SN, which ensures faster settlement.
Rate Limit: 5 requests per 1 second.

Authorizations:
(ApiKeyApiTimestampApiSignature)
Request Body schema: application/json
required
currency_symbol
required
string

The currency of the transfer. Cannot be a fiat currency (e.g., brl)

amount
required
string

The amount of the transfer

email
string

The recipient's email address. Required if the SN is not present

tax_id_number
string

The recipient's tax ID number. Required if the SN is not present

member_sn
string

The recipient's SN. Required if both Email and Tax ID number are not present

Responses

Request samples

Content type
application/json
{
  • "currency_symbol": "btc",
  • "amount": "1.0",
  • "email": "[email protected]",
  • "tax_id_number": "12345678900",
  • "member_sn": "FHKGR3KKR2UIAB"
}

Response samples

Content type
application/json
{
  • "uuid": "249f20b1-ba78-44e9-b70b-cb6750295517",
  • "created_at": "2021-11-25T13:23:27.961Z"
}