# Bitfinex Documentation ## Guides - [Changelog](https://docs.bitfinex.com/docs/changelog.md) - [Requirements and Limitations](https://docs.bitfinex.com/docs/requirements-and-limitations.md) - [Showcase](https://docs.bitfinex.com/docs/showcase.md) - [Withdraw requests and the "Travel Rule"](https://docs.bitfinex.com/docs/withdraw-requests-and-the-travel-rule.md) - [Authenticated Endpoints](https://docs.bitfinex.com/docs/rest-auth.md) - [Public Endpoints](https://docs.bitfinex.com/docs/rest-public.md) ## API Reference - [Deposit Address List](https://docs.bitfinex.com/reference/deposit-address-all.md): Retrieve all deposit addresses for a specific currency. - [Generate Token](https://docs.bitfinex.com/reference/generate-token.md): Generates an auth token that could be used for api requests - [Key Permissions](https://docs.bitfinex.com/reference/key-permissions.md): Retrieve current api key/token permissions - [LNX Invoice Payments](https://docs.bitfinex.com/reference/lnx-invoice-payments.md): Retrieve invoice and payment data - [Movement info](https://docs.bitfinex.com/reference/movement-info.md): Detailed information about the deposit/withdrawal - [OTC Orders History](https://docs.bitfinex.com/reference/otc-orders-history.md): Returns historic OTC orders. - [Alert Delete](https://docs.bitfinex.com/reference/rest-auth-alert-del.md): Delete an active alert. - [Alert Set](https://docs.bitfinex.com/reference/rest-auth-alert-set.md): Sets up a price alert at the given value - [Alert List](https://docs.bitfinex.com/reference/rest-auth-alerts.md): Retrieve a list of active price alerts. - [Changelog](https://docs.bitfinex.com/reference/rest-auth-audit-hist.md): Retrieve account changelog. - [Derivative Position Collateral Limits](https://docs.bitfinex.com/reference/rest-auth-calc-deriv-collateral-limits.md): Calculate the minimum and maximum collateral that can be assigned to your derivative position. - [Cancel All Funding Offers](https://docs.bitfinex.com/reference/rest-auth-cancel-all-funding-offers.md): Cancel all of your current funding offers. Can also be used to only cancel offers in the specified currency. - [Cancel Funding Offer](https://docs.bitfinex.com/reference/rest-auth-cancel-funding-offer.md): Cancels an existing Funding Offer based on the offer ID entered. - [Cancel Order](https://docs.bitfinex.com/reference/rest-auth-cancel-order.md): Cancels one of the current user's orders. - [Cancel Orders (multiple)](https://docs.bitfinex.com/reference/rest-auth-cancel-orders-multiple.md): Cancels multiple orders simultaneously. Orders can be canceled based on the Order ID, the combination of Client Order ID and Client Order Date, or the Group Order ID. Alternatively, the body param 'all' can be used with a value of 1 to cancel all orders. - [Deposit Address](https://docs.bitfinex.com/reference/rest-auth-deposit-address.md): Retrieve your deposit address or generate a new deposit address for a specific currency and wallet. - [Generate Invoice](https://docs.bitfinex.com/reference/rest-auth-deposit-invoice.md): Generates a Lightning Network deposit invoice - [Derivative Position Collateral](https://docs.bitfinex.com/reference/rest-auth-deriv-pos-collateral-set.md): Update the amount of collateral assigned to a derivative position - [Funding Auto-renew](https://docs.bitfinex.com/reference/rest-auth-funding-auto-renew.md): Activate or deactivate auto-renew. Allows you to specify the currency, amount, rate, and period. - [Funding Close](https://docs.bitfinex.com/reference/rest-auth-funding-close.md): Return Taken "Used" or "Unused" funding. - [Funding Credits History](https://docs.bitfinex.com/reference/rest-auth-funding-credits-hist.md): Inactive funds used in positions. Limited to last 3 days. - [Funding Credits](https://docs.bitfinex.com/reference/rest-auth-funding-credits.md): Funds used in active positions - [Funding Loans History](https://docs.bitfinex.com/reference/rest-auth-funding-loans-hist.md): Inactive funds not used in positions. Limited to last 3 days. - [Funding Loans](https://docs.bitfinex.com/reference/rest-auth-funding-loans.md): Funds not used in active positions - [Funding Offers History](https://docs.bitfinex.com/reference/rest-auth-funding-offers-hist.md): Get past inactive funding offers. - [Active Funding Offers](https://docs.bitfinex.com/reference/rest-auth-funding-offers.md): Get active funding offers. A path param can be used to retrieve offers in a particular currency. All offers are returned if no currency is specified. - [Funding Trades](https://docs.bitfinex.com/reference/rest-auth-funding-trades-hist.md): Get funding trades for offered funding. Can be used to request funding trades for a specific currency or to retrieve trades for all currencies at once. - [Increase Position Info](https://docs.bitfinex.com/reference/rest-auth-increase-position-info.md): Returns information relevant to the increase position endpoint. - [Funding Info](https://docs.bitfinex.com/reference/rest-auth-info-funding.md): Get account funding info - [Margin Info](https://docs.bitfinex.com/reference/rest-auth-info-margin.md): Get account margin information (like P/L, Swaps, Margin Balance, Tradable Balance and others). Use different keys (base, SYMBOL, sym_all) to retrieve different kinds of data. - [User Info](https://docs.bitfinex.com/reference/rest-auth-info-user.md): Retrieve an array of important account data. - [Keep Funding](https://docs.bitfinex.com/reference/rest-auth-keep-funding.md): Toggle to keep funding taken. Specify loan for unused funding and credit for used funding. - [Ledgers](https://docs.bitfinex.com/reference/rest-auth-ledgers.md): View your past ledger entries. Most recent entries are returned by default, but a timestamp can be used to retrieve time-specific data. The endpoint returns data up to 6 years old. - [Login History](https://docs.bitfinex.com/reference/rest-auth-logins-hist.md): Retrieve a list of past logins. - [Movements](https://docs.bitfinex.com/reference/rest-auth-movements.md): View your past deposits/withdrawals. Currency can be specified to retrieve movements specific to that currency. - [Order Multi-OP](https://docs.bitfinex.com/reference/rest-auth-order-multi.md): Send Multiple order-related operations. Please note the sent object has only one property with a value of an array of arrays detailing each order operation. (Max 75 operations per request) - [Order Trades](https://docs.bitfinex.com/reference/rest-auth-order-trades.md): Get Trades generated by an Order. Valid for trades upto 10 days old. - [Orders History (by symbol)](https://docs.bitfinex.com/reference/rest-auth-orders-history-by-symbol.md): Retrieves all user's closed/cancelled orders up to 2 weeks in the past by trading pair symbol (e.g. tBTCUSD, tLTCBTC, ...). - [Orders History](https://docs.bitfinex.com/reference/rest-auth-orders-history.md): Retrieves all user's closed/cancelled orders up to 2 weeks in the past. - [Claim Position](https://docs.bitfinex.com/reference/rest-auth-position-claim.md): The claim feature allows the use of funds you have in your Margin Wallet to settle a leveraged position as an exchange buy or sale. Claiming some or all of a position requires that you have enough partially realized P/L (you've reduced the position at a profit) and/or funds (BTC or USD) in your Margin Wallet (net of any outstanding financing charges) to satisfy some or all of the outstanding financing associated with your position. - [Positions Audit](https://docs.bitfinex.com/reference/rest-auth-positions-audit.md): Return an audit of your positions. You latest positions will be retrieved by default, but ID's can be specified to retrieve an audit for specific positions. - [Positions History](https://docs.bitfinex.com/reference/rest-auth-positions-hist.md): Returns data on past positions. Timestamps can be used to retrieve results for a specific time period. - [Positions Snapshot](https://docs.bitfinex.com/reference/rest-auth-positions-snap.md): Returns position snapshots of user positions between the specified start and end perimiters. Snapshots are taken daily. - [Retrieve Positions](https://docs.bitfinex.com/reference/rest-auth-positions.md): Get active positions - [Retrieve Orders (by symbol)](https://docs.bitfinex.com/reference/rest-auth-retrieve-orders-by-symbol.md): Gets all the current user's active orders by trading pair symbol (e.g. tBTCUSD, tLTCBTC, ...). - [Retrieve Orders](https://docs.bitfinex.com/reference/rest-auth-retrieve-orders.md): Gets all the current user's active orders. - [User Settings Write](https://docs.bitfinex.com/reference/rest-auth-settings-set.md): Allows you to create custom settings by creating key: value pairs. - [Submit Funding Offer](https://docs.bitfinex.com/reference/rest-auth-submit-funding-offer.md): Submit a new funding offer. - [Submit Order](https://docs.bitfinex.com/reference/rest-auth-submit-order.md): Submits an order on a trading pair (e.g. BTCUSD, LTCBTC, ...). - [Summary](https://docs.bitfinex.com/reference/rest-auth-summary.md): Provides an overview of the different fee rates for the account as well as the LEO discount level and the average amount of LEO held over the last 30 days. - [Trades (by symbol)](https://docs.bitfinex.com/reference/rest-auth-trades-by-symbol.md): Retrieve your trades by trading pair symbol (e.g. tBTCUSD, tLTCUSD, ...). Your most recent trades will be retrieved by default, but a timestamp can be used to retrieve time-specific data. - [Trades](https://docs.bitfinex.com/reference/rest-auth-trades.md): Retrieve your trades. Your most recent trades will be retrieved by default, but a timestamp can be used to retrieve time-specific data. - [Transfer Between Wallets](https://docs.bitfinex.com/reference/rest-auth-transfer.md): Transfer funds between wallets. This endpoint can also be used to convert USDT to USDT0 for derivatives trading. - [Update Order](https://docs.bitfinex.com/reference/rest-auth-update-order.md): Updates an existing order, can be used to update margin, exchange, and derivative orders. - [Wallets](https://docs.bitfinex.com/reference/rest-auth-wallets.md): Returns an array of all the current user's wallets. - [Withdrawal](https://docs.bitfinex.com/reference/rest-auth-withdraw.md): Allows you to request a withdrawal from one of your wallets. - [Thalex Derivatives Endpoints](https://docs.bitfinex.com/reference/thalex.md): This section contains endpoints related to Thalex Derivatives - [Thalex Deposit Request](https://docs.bitfinex.com/reference/thalex-deposit-request.md): Deposit to Thalex from Bitfinex - [Thalex Free Transfer Count](https://docs.bitfinex.com/reference/thalex-free-transfer-count.md): Get information about free transfers and their renewal. Users are eligible for two free deposits every 24 hours. - [Thalex Withdrawal Request](https://docs.bitfinex.com/reference/thalex-withdrawal-request.md): Withdraw from Thalex to Bitfinex - [Update Position Funding Type](https://docs.bitfinex.com/reference/update-position-funding-type.md): Update the funding type of a given position - [Candles](https://docs.bitfinex.com/reference/rest-public-candles.md): The Candles endpoint provides OCHL (Open, Close, High, Low) and volume data for the specified funding currency or trading pair. The endpoint provides the last 100 candles by default, but a limit and a start and/or end timestamp can be specified. - [Configs](https://docs.bitfinex.com/reference/rest-public-conf.md): Fetch site configuration data - [Derivatives Status History](https://docs.bitfinex.com/reference/rest-public-derivatives-status-history.md): Endpoint used to receive different types of historical platform information - currently supports derivatives pair status only. - [Funding Statistics](https://docs.bitfinex.com/reference/rest-public-funding-stats.md): Get a list of the most recent funding data for the given currency: FRR, average period, total amount provided, total amount used - [Liquidations](https://docs.bitfinex.com/reference/rest-public-liquidations.md): Endpoint to retrieve liquidations. By default it will retrieve the most recent liquidations, but time-specific data can be retrieved using timestamps. - [Leaderboards](https://docs.bitfinex.com/reference/rest-public-rankings.md): The leaderboards endpoint allows you to retrieve leaderboard standings for unrealized profit (period delta), unrealized profit (inception), volume, and realized profit. - [Stats](https://docs.bitfinex.com/reference/rest-public-stats.md): The Stats endpoint provides various statistics on a specified trading pair or funding currency. Use the available keys to specify which statistic you wish to retrieve. - [Trades](https://docs.bitfinex.com/reference/rest-public-trades.md): The trades endpoint allows the retrieval of past public trades and includes details such as price, size, and time. Optional parameters can be used to limit the number of results; you can specify a start and end timestamp, a limit, and a sorting method. - [Virtual Asset Service Providers](https://docs.bitfinex.com/reference/virtual-asset-service-providers.md): Returns a list of VASP names along with their respective ID - [Account Info](https://docs.bitfinex.com/reference/ws-auth-account-info.md): The account info channel is a channel that you are automatically subscribed to when you authenticate your session. It provides all the pertinent info for your orders, positions, trades, funding offers and loans, balances, and more. - [Balance Info](https://docs.bitfinex.com/reference/ws-auth-balance-info.md): The Balance Info channel provides data on the total and net assets in your account. - [Funding Credits](https://docs.bitfinex.com/reference/ws-auth-funding-credits.md): Receive a snapshot and updates for any funding credits (funds used in active positions) on your account. - [Funding Loans](https://docs.bitfinex.com/reference/ws-auth-funding-loans.md): Receive a snapshot and updates for any funding loans (funds not used in active positions) on your account. - [Funding Offers](https://docs.bitfinex.com/reference/ws-auth-funding-offers.md): Receive a snapshot and updates for any position events on your account. - [Funding Trades](https://docs.bitfinex.com/reference/ws-auth-funding-trades.md): Receive updates for any trade events on your account. - [Funding Info](https://docs.bitfinex.com/reference/ws-auth-funding.md): Get account funding info - [Margin Info](https://docs.bitfinex.com/reference/ws-auth-margin-info.md): Receive margin info updates for your account. - [Notifications](https://docs.bitfinex.com/reference/ws-auth-notifications.md): The Notifications channel is a work in progress that will be used for different changes in status, price alerts, etc. - [Orders](https://docs.bitfinex.com/reference/ws-auth-orders.md): Receive a snapshot and updates for any order events on your account. - [Positions](https://docs.bitfinex.com/reference/ws-auth-positions.md): Receive a snapshot and updates for any position events on your account. - [Trades](https://docs.bitfinex.com/reference/ws-auth-trades.md): Receive updates for any trade events on your account. - [Wallets](https://docs.bitfinex.com/reference/ws-auth-wallets.md): Receive a snapshot and updates for any wallet events on your account. - [New Order](https://docs.bitfinex.com/reference/ws-auth-input-order-new.md): Creates a new order, can be used to create margin, exchange, and derivative orders. - [Update Order](https://docs.bitfinex.com/reference/ws-auth-input-order-update.md): Update an existing order, can be used to update margin, exchange, and derivative orders. - [Books](https://docs.bitfinex.com/reference/ws-public-books.md): The Order Books channel allows you to keep track of the state of the Bitfinex order book. It is provided on a price aggregated basis with customizable precision. Upon connecting, you will receive a snapshot of the book followed by updates for any changes to the state of the book. - [Candles](https://docs.bitfinex.com/reference/ws-public-candles.md): The Candles endpoint provides OCHL (Open, Close, High, Low) and volume data for the specified trading pair. - [Raw Books](https://docs.bitfinex.com/reference/ws-public-raw-books.md): The Raw Books channel provides the most granular books. - [Status](https://docs.bitfinex.com/reference/ws-public-status.md): Subscribe to and receive different types of platform information - currently supports derivatives pair status and liquidation feed. - [Ticker](https://docs.bitfinex.com/reference/ws-public-ticker.md): The ticker endpoint provides a high level overview of the state of the market for a specified pair. It shows the current best bid and ask, the last traded price, as well as information on the daily volume and price movement over the last day. - [Trades](https://docs.bitfinex.com/reference/ws-public-trades.md): This channel sends a trade message whenever a trade occurs at Bitfinex. It includes all the pertinent details of the trade, such as price, size and the time of execution. The channel can send funding trade data as well. ## Recipes - [[REST][C#] Authenticated request example](https://docs.bitfinex.com/recipes/restc-authenticated-request-example.md) - [[REST][Java] Authenticated request example](https://docs.bitfinex.com/recipes/restjava-authenticated-request-example.md) - [[REST][Javascript] Authenticated request example](https://docs.bitfinex.com/recipes/restjavascript-authenticated-request-example.md) - [[REST][PHP] Authenticated request example](https://docs.bitfinex.com/recipes/restphp-authenticated-request-example.md) - [[REST][Python] Authenticated request example](https://docs.bitfinex.com/recipes/restpython-authenticated-request-example.md) - [[WS][JavaScript] Authenticated connection example](https://docs.bitfinex.com/recipes/wsjavascript-authenticated-connection-example-1.md) - [[WS][Python] Authenticated connection example](https://docs.bitfinex.com/recipes/wspython-authenticated-connection-example.md)