Connect to Bitfinex via Vezgo API
Accounts
Positions
Transactions
Support for Accounts, Positions and Transactions enabled.
Support for Positions & Balances:
- Spot
Supported Transaction Types:
- Spot: deposits/withdrawals & trades.
Additional notes:
- You can fetch up to 2500 trades & 1000 deposits & withdrawals.
Data mapping
A field-level guide to the Vezgo API data for Bitfinex — what each attribute means and where to read it — so you can map it into your own system.
| Data | Where to read it | Source on Bitfinex |
|---|---|---|
| Account & wallets | account.wallets[] | Bitfinex connects with an API key + secret; a read-only key is recommended. The account is one entry in account.wallets[] (key on wallet.id), holding the balances of Bitfinex's Exchange, Margin and Funding wallets together. |
| Balances / positions | account.balances[] | One balance per currency, adding up the Exchange, Margin and Funding wallets. Each balance has ticker, amount, decimals and fiat_value (USD). asset_type is "crypto" for coins and stablecoins, "cash" for USD, and "cash_equivalent" for other fiat (e.g. EUR, GBP, JPY). Tickers use CCXT's unified codes (Bitfinex's UST is USDT). |
| Transactions | GET /accounts/:id/transactions | Trades (OTC trades included), crypto and fiat deposits / withdrawals, and the ledger's other entries: transfers between wallets, margin funding payments and charges, position funding costs, settlements, staking rewards, rebates, fees and adjustments. See "How to read a transaction" below. |
| Assets / securities | balance.ticker | Identified by ticker (e.g. BTC, ETH, USDT), as Bitfinex holdings are exchange balances rather than on-chain tokens. |
How to read a transaction
Each Bitfinex activity maps to a Vezgo transaction. Read the value movement from parts[], and classify with transaction_type / transaction_subtype:
- Value movement — parts[] (direction sent/received, ticker, provider_ticker, amount, fiat_value in USD, and a description, which on ledger entries is Bitfinex's own text, e.g. "Settlement @ 185.79 on wallet margin"). Amounts are positive; direction carries the sign. A trade has two parts: the base leg (the executed amount) and the quote leg (the amount times the price), both valued at the trade's USD value. A deposit, a withdrawal and every other ledger entry has one part.
- Type — transaction_type is trade, deposit, withdrawal or other. transaction_subtype refines it: buy / sell on a trade with a fiat side (USD, EUR, …), trade_crypto on a trade between two cryptocurrencies (stablecoins count as crypto), and onchain_deposit / onchain_withdrawal on every deposit / withdrawal, fiat ones included. The ledger's other entries are transaction_type other: misc.origin_type names their kind, and parts[].direction says whether funds came in or went out.
- Fees — fees[] (ticker, amount, fiat_value in USD) holds a trade's trading fee or a deposit / withdrawal's fee, charged on top of the parts: deduct it from the balance of the asset in fees[].ticker. A maker rebate is a negative fee, so deducting it adds it back. An OTC trade's two parts are the exact amounts exchanged, and the ledger's fee entries (misc.origin_type fee) are transactions of their own.
- misc.origin_id is Bitfinex's trade id for a trade, otc-<ledger id> for an OTC trade (the lower id of its two ledger lines), the on-chain txid for a crypto deposit / withdrawal or Bitfinex's movement id for a fiat one, and the ledger entry id for every other entry. misc.origin_type is trade, otc_trade, crypto-deposit / crypto-withdrawal (the label for every movement, fiat included), or the ledger entry's kind. Trades also carry misc.origin_pair (e.g. BTC/USD), and order-book trades misc.order_id. A deposit carries the deposit address in parts[].from_address and a withdrawal its destination in parts[].to_address; a crypto movement's on-chain hash is its misc.origin_id.
// One Vezgo transaction = a Bitfinex activity (a trade carries its two legs as parts)
const id = tx.misc.origin_id; // trade id, otc-<ledger id>, txid or movement id, or ledger entry id
const kind = tx.misc.origin_type; // trade | otc_trade | crypto-deposit | crypto-withdrawal | transfer | settlement | …
const type = tx.transaction_type; // trade | deposit | withdrawal | other
const subtype = tx.transaction_subtype;// buy | sell | trade_crypto | onchain_deposit | onchain_withdrawal
const parts = tx.parts ?? []; // trade = 2 legs (base + quote); else 1
const fees = tx.fees ?? []; // trading or deposit/withdrawal fee — charged on top: deduct it (a rebate is negative)
// The ledger's other entries are transaction_type "other": misc.origin_type names the kind,
// and parts[].description is Bitfinex's own text (e.g. "Settlement @ 185.79 on wallet margin").| Where to read it | Attributes | What it is |
|---|---|---|
tx.parts[] | direction, ticker, provider_ticker, amount, fiat_value, description, from_address, to_address | Value movement. A trade has 2 legs (base + quote); a deposit, a withdrawal and every other ledger entry has 1. description is Bitfinex's text on ledger entries; from_address / to_address carry a deposit's or withdrawal's address. |
tx.transaction_type · transaction_subtype | trade / deposit / withdrawal / other · buy, sell, trade_crypto, onchain_deposit, onchain_withdrawal | Normalized classification — prefer these over the raw misc.origin_type. The ledger's other entries are other; misc.origin_type names their kind. |
tx.fees[] | ticker, amount, fiat_value | Trading fee or deposit / withdrawal fee, charged on top of the parts — deduct it from the balance of fees[].ticker. A maker rebate is a negative fee. |
tx.misc | origin_id, origin_type, origin_pair, order_id | Bitfinex's id and kind for the activity; trades add the pair (e.g. BTC/USD) and, from the order book, the order id. |
misc.origin_type is trade, otc_trade or crypto-deposit / crypto-withdrawal (fiat movements included), and for the ledger's other entries the kind read from Bitfinex's description. Always classify off transaction_type. Common values:
- trade
- otc_trade
- crypto-deposit
- crypto-withdrawal
- transfer
- settlement
- position_funding_cost
- position_increased
- position_claimed
- position_closed
- margin_funding_payment
- margin_funding_charge
- staking_reward
- rebate
- fee
- adjustment
- other
Supported
- Crypto and fiat balances across the Exchange, Margin and Funding wallets
- Trades with both legs as parts — buy / sell, or trade_crypto between two cryptocurrencies
- OTC trades, paired from the ledger into two-part trades
- Crypto and fiat deposits and withdrawals, with addresses and on-chain txids
- The ledger's other activity: wallet transfers, margin funding payments and charges, position funding costs, settlements, staking rewards, rebates and adjustments
- Trading, deposit and withdrawal fees, in the fee's own asset
- USD fiat valuation for balances and transactions
Try to connect to Bitfinex in our Demo Sandbox
Open DemoLet's get you started
To get your API Keys, sign up on the portal or reach out to the team at sales@vezgo.com