Bitfinex API - LabMazurokCom/Blockchain GitHub Wiki
Intro
Website: https://www.bitfinex.com/
Documentation: https://bitfinex.readme.io/v1/reference
Limits: UNKNOWN
Fee used in bot: 0.2% (taker fee for monthly volume less than 500K USD)
List of symbols
https://api.bitfinex.com/v1/symbols
Order book
https://api.bitfinex.com/v1/book/btcusd?limit_bids=10&limit_asks=10&group=1
N.B. symbol (btcusd etc.) is required. List of all symbols can be found here: https://api.bitfinex.com/v1/symbols
Ratelimit: 60 req/min
Request keys
Key | Required | Type | Default | Description |
---|---|---|---|---|
limit_bids | false | [int] | 50 | Limit the number of bids returned. May be 0 in which case the array of bids is empty |
limit_asks | false | [int] | 50 | Limit the number of asks returned. May be 0 in which case the array of asks is empty |
group | false | [0/1] | 1 | If 1, orders are grouped by price in the orderbook. If 0, orders are not grouped and sorted individually |
Response
{
"bids":[{
"price":"574.61",
"amount":"0.1439327",
"timestamp":"1472506127.0"
}],
"asks":[{
"price":"574.62",
"amount":"19.1334",
"timestamp":"1472506126.0"
}]
}
Ticker
https://api.bitfinex.com/v1/pubticker/btcusd
N.B. symbol (btcusd etc.) is required. List of all symbols can be found here: https://api.bitfinex.com/v1/symbols
Ratelimit: 30 req/min
Response
{
"mid":"244.755",
"bid":"244.75",
"ask":"244.76",
"last_price":"244.82",
"low":"244.2",
"high":"248.19",
"volume":"7842.11542563",
"timestamp":"1444253422.348340958"
}
Key | Type | Description |
---|---|---|
mid | [price] | (bid + ask) / 2 |
bid | [price] | Innermost bid |
ask | [price] | Innermost ask |
last_price | [price] | The price at which the last order executed |
low | [price] | Lowest trade price of the last 24 hours |
high | [price] | Highest trade price of the last 24 hours |
volume | [price] | Trading volume of the last 24 hours |
timestamp | [time] | The timestamp at which this information was valid |
Order types
N.B. User cannot place more than 256 orders within a 2-minute time frame.
Limit
It allows the trader to specify a price and amount they would like to buy or sell.
Market
A market order is an order type that executes immediately against the best price available. As long as there are willing sellers and buyers, market orders are filled. A market sell will match the best available bids on the order book, and a market buy will match against the best available asks on the order book.
Fill or Kill(FOK)
A "fill or kill" order is a limit order that must be filled immediately in its entirety or it is canceled (killed). The purpose of a fill or kill order is to ensure that a position is entered instantly and at a specific price.
One Cancels Other (OCO)
The one cancels other order option allows you to place a pair of orders stipulating that if one order is executed fully or partially, then the other is automatically canceled. An OCO order combines a stop order with a limit order. This option allows you to place both take profit and stop loss targets for your position (only for limit orders). Note: If you manually cancel one of the OCO orders; i.e., the stop or the limit, you must also manually cancel the other one. An OCO order is only automatically canceled if the other order is partially or fully executed by market price movement.
Hidden option
The hidden order option ensures an order does not appear in the order book; thus does not influence other market participants.
Post-Only Limit
The post-only limit order option ensures the limit order will be added to the order book and not match with a pre-existing order. If your order would cause a match with a pre-existing order, your post-only limit order will be canceled. This ensures that you will pay the maker fee and not the taker fee.
N.B. Both market and limit orders can be partially executed.
Order Execution
EXECUTED IN THE LAST 30 DAYS (USD EQUIVALENT) | MAKER FEES | TAKER FEES |
---|---|---|
$0.00 or more traded | 0.100% | 0.200% |
$500,000.00 or more traded | 0.080% | 0.200% |
$1,000,000.00 or more traded | 0.060% | 0.200% |
$2,500,000.00 or more traded | 0.040% | 0.200% |
$5,000,000.00 or more traded | 0.020% | 0.200% |
$7,500,000.00 or more traded | 0.000% | 0.200% |
$10,000,000.00 or more traded | 0.000% | 0.180% |
$15,000,000.00 or more traded | 0.000% | 0.160% |
$20,000,000.00 or more traded | 0.000% | 0.140% |
$25,000,000.00 or more traded | 0.000% | 0.120% |
$30,000,000.00 or more traded | 0.000% | 0.100% |
Maker fees are paid when you add liquidity to our order book by placing a limit order under the ticker price for buy and above the ticker price for sell.
Taker fees are paid when you remove liquidity from our order book by placing any order that is executed against an order of the order book.
Note: If you place a hidden order, you will always pay the taker fee. If you place a limit order that hits a hidden order, you will always pay the maker fee.
Currency limits
https://api.bitfinex.com/v1/symbols_details
For all pairs on Bitfinex it is used 5 significant digits.
The minimum order sizes for each trading pair is periodically adjusted to maintain order sizes that are reasonably proportioned to their values. The ultimate goal is to keep the minimum order size between 10-25 USD equivalent value while limiting the changes to the minimum order sizes to useful incremental values.
Private API requests
New accounts must achieve an initial account equity of 10,000 USD to access platform features.