Funcoin 做市商API

一、接口说明

接口采用POST方式进行通讯,返回采用JSON格式。

二、获取Funcoin 交易对信息

接口地址:

http://server.funcoin.co/market/currency_pair

参数:无
响应成功示例如下:

[
    {
        "currency_id": 40,
        "currency_trade_id": 0,
        "currency_mark": "BTC",
        "trade_mark": "KRW",
        "cy_id": 1,
        "min_money": 1
    },
    {
        "currency_id": 44,
        "currency_trade_id": 0,
        "currency_mark": "BCH",
        "trade_mark": "KRW",
        "cy_id": 2,
        "min_money": 0
    }
]

返回说明:
currency_id 币种id
currency_trade_id 交易货币id
currency_mark 币种名称
trade_mark 所在交易区名称
cy_id 交易对id
min_money:最小交易数量

三、登录

接口地址:

http://server.funcoin.co/market/login

参数:
email 账户名
pass 密码
响应成功示例如下:

{
    "status": 1,
    "info": "success,use this token to market",
    "market_token": "1ue6vn08vmjfhengsjuth1m7f7bqmunk"
}

返回说明:market_token 用来进行交易、撤单等操作。market_token 有效期为24小时,避免过期请定时调用此接口。

四、挂单交易

此接口每分钟调用不超过180次。每个做市商可以交易的交易对由Funcoin控制,如有需要请联系官方。
接口地址:

http://server.funcoin.co/market/trade

参数:
cy_id 交易对id
price 价格
num 数量
trade_pwd 交易密码
type 类型(buy买入 sell卖出)
market_token 票据
响应成功示例如下:

{
    "status": 1,
    "info": "请求成功"
}

五、我的订单

接口地址:

http://server.funcoin.co/market/my_order

参数:
currency_trade_id 交易货币id
currency_id 币种id
type 类型(buy 买入 sell卖出)
page 页码(从1开始)
page_size 每页条数
begin 开始时间(时间戳)
end 结束时间(时间戳)
market_token 票据
响应成功示例如下:

{
    "status": 1,
    "info": "请求成功",
    "data": [
        {
            "orders_id": 8060108,
            "currency_id": 40,
            "currency_trade_id": 0,
            "price": "10000.000000000",
            "num": "2.000000000",
            "trade_num": "0.000000000",
            "type": "buy",
            "add_time": 1534148932,
            "status": 0,
            "currency_market": "KRW",
            "currency_mark": "BTC"
        },
        {
            "orders_id": 8060107,
            "currency_id": 40,
            "currency_trade_id": 0,
            "price": "10000.000000000",
            "num": "2.000000000",
            "trade_num": "0.000000000",
            "type": "buy",
            "add_time": 1534148745,
            "status": 0,
            "currency_market": "KRW",
            "currency_mark": "BTC"
        }
    ],
    "count": 2
}

六、撤销订单

接口地址:

http://server.funcoin.co/market/cancel

参数:
orders_id 订单id
market_token 票据
响应成功示例如下:

{
    "status": 1,
    "info": "撤单成功!"
}

七、获取交易对买卖单、最近成交、交易对涨跌以及交易市场行情

接口地址:

http://server.funcoin.co/market/get_trade_data

参数:cy_id 交易对id
响应成功示例如下:

{
    "status": 1,
    "info": "请求成功",
    "data": {
        "buy": [
            {
                "total": "0.940600000",
                "price": "668,622",
                "tradeNum": "0",
                "currency_trade_id": 0,
                "type": "buy",
                "currency_id": 44,
                "total_num": "0.940600000",
                "trade_num": "0",
                "left_num": "0.9406",
                "left_rate": 100,
                "left_money": "628,906",
                "price_origin": 668622
            },
            {
                "total": "0.709000000",
                "price": "668,103",
                "tradeNum": "0",
                "currency_trade_id": 0,
                "type": "buy",
                "currency_id": 44,
                "total_num": "0.709000000",
                "trade_num": "0",
                "left_num": "0.7090",
                "left_rate": 100,
                "left_money": "473,685",
                "price_origin": 668103
            }
        ],
        "sell": [
            {
                "total": "0.436600000",
                "price": "700,001",
                "tradeNum": "0",
                "currency_trade_id": 0,
                "type": "sell",
                "currency_id": 44,
                "total_num": "0.436600000",
                "trade_num": "0",
                "left_num": "0.4366",
                "left_rate": 100,
                "left_money": "305,620",
                "price_origin": 700001
            },
            {
                "total": "0.376400000",
                "price": "700,037",
                "tradeNum": "0",
                "currency_trade_id": 0,
                "type": "sell",
                "currency_id": 44,
                "total_num": "0.376400000",
                "trade_num": "0",
                "left_num": "0.3764",
                "left_rate": 100,
                "left_money": "263,494",
                "price_origin": 700037
            }
        ],
        "trade": [
            {
                "price": "680,270",
                "num": "0.1133",
                "time": 1535007995,
                "type": "buy",
                "add_time": "16:06:35"
            },
            {
                "price": "680,270",
                "num": "0.0696",
                "time": 1535007949,
                "type": "buy",
                "add_time": "16:05:49"
            }
        ],
        "currency_zd": {
            "currency_logo": "http://static.bimin.vip/admin/old/uploads/2017-12-20/5a39ef73e5f403.18416275.png",
            "currency_mark": "BCH",
            "currency_trade_id": 0,
            "currency_id": 44,
            "price_status": "0",
            "new_price": "680,592",
            "trade_mark": "KRW",
            "trade_logo": "http://static.bimin.vip/app/1.0/krw_logo.png",
            "cy_id": "2",
            "h24_num": "235.8186",
            "h24_change": -18.26,
            "h24_money": "1.608057525545E8",
            "h24_max": "832674.0",
            "h24_min": "655729.0",
            "first_price": "832674.0",
            "krw_price": 1,
            "is_chuang": 0,
            "is_old": null,
            "input_price_num": 0,
            "rate_num": 2,
            "order_num": 0,
            "new_price_h": "¥4,124.80",
            "H24_max_h": "¥5,046.51",
            "H24_min_h": "¥3,974.12",
            "H24_money_h": "¥974,580.32",
            "H24_max": "832,674",
            "H24_min": "655,729",
            "H24_num": "235.82",
            "H24_money": "160,805,752.55",
            "H24_change": -18.26,
            "trade_name": "KRW",
            "currency_buy_fee": "0.10",
            "currency_sell_fee": "0.10",
            "detail_id": "46"
        },
        "market_zd": [
            {
                "market_name": "KRW",
                "market_cid": 0,
                "logo": "http://static.bimin.vip/app/1.0/krw_logo.png",
                "content": [
                    
                    },
                    {
                        "currency_logo": "http://static.bimin.vip/admin/old/uploads/2018-05-08/5af142687827b6.02302925.png",
                        "currency_mark": "OMG",
                        "currency_trade_id": 0,
                        "currency_id": 74,
                        "price_status": "1",
                        "new_price": "6,001",
                        "trade_mark": "KRW",
                        "trade_logo": "http://static.bimin.vip/app/1.0/krw_logo.png",
                        "cy_id": "62",
                        "h24_num": "344.09",
                        "h24_change": -0.92,
                        "h24_money": "2063229.49",
                        "h24_max": "6060.0",
                        "h24_min": "5949.0",
                        "first_price": "6057.0",
                        "krw_price": 1,
                        "is_chuang": 1,
                        "is_old": null,
                        "input_price_num": 0,
                        "rate_num": 2,
                        "order_num": 0,
                        "new_price_h": "¥36.37",
                        "H24_max_h": "¥36.73",
                        "H24_min_h": "¥36.05",
                        "H24_money_h": "¥12,504.42",
                        "H24_max": "6,060",
                        "H24_min": "5,949",
                        "H24_num": "344.09",
                        "H24_money": "2,063,229.49",
                        "H24_change": -0.92,
                        "trade_name": "KRW"
                    },
                    {
                        "currency_logo": "http://static.bimin.vip/admin/old/uploads/2018-05-08/5af17e4410b120.96821076.png",
                        "currency_mark": "FUN",
                        "currency_trade_id": 0,
                        "currency_id": 75,
                        "price_status": "-1",
                        "new_price": "19.07",
                        "trade_mark": "KRW",
                        "trade_logo": "http://static.bimin.vip/app/1.0/krw_logo.png",
                        "cy_id": "64",
                        "h24_num": "107877.0",
                        "h24_change": -5.64,
                        "h24_money": "2200538.9681",
                        "h24_max": "22.53",
                        "h24_min": "18.72",
                        "first_price": "20.21",
                        "krw_price": 1,
                        "is_chuang": 1,
                        "is_old": 0,
                        "input_price_num": 2,
                        "rate_num": 3,
                        "order_num": 0,
                        "new_price_h": "¥0.116",
                        "H24_max_h": "¥0.137",
                        "H24_min_h": "¥0.113",
                        "H24_money_h": "¥13,336.60",
                        "H24_max": "22.53",
                        "H24_min": "18.72",
                        "H24_num": "107,877.00",
                        "H24_money": "2,200,538.97",
                        "H24_change": -5.64,
                        "trade_name": "KRW"
                    }
                ]
            },
            {
                "market_name": "BTC",
                "market_cid": 40,
                "logo": "http://static.bimin.vip/admin/old/uploads/2018-03-15/5aa9d58e994573.82617081.png",
                "content": [
                   
                    {
                        "currency_logo": "http://static.bimin.vip/admin/old/uploads/2018-05-08/5af142687827b6.02302925.png",
                        "currency_mark": "OMG",
                        "currency_trade_id": 40,
                        "currency_id": 74,
                        "price_status": "0",
                        "new_price": "0.000850",
                        "trade_mark": "BTC",
                        "trade_logo": "http://static.bimin.vip/admin/old/uploads/2018-03-15/5aa9d58e994573.82617081.png",
                        "cy_id": "75",
                        "h24_num": "26.38",
                        "h24_change": -1.62,
                        "h24_money": "0.02266202",
                        "h24_max": "8.64E-4",
                        "h24_min": "8.02E-4",
                        "first_price": "8.64E-4",
                        "krw_price": "9324150.000000000",
                        "is_chuang": 0,
                        "is_old": 0,
                        "input_price_num": 6,
                        "rate_num": 2,
                        "order_num": null,
                        "new_price_h": "¥48.03",
                        "H24_max_h": "¥48.82",
                        "H24_min_h": "¥45.32",
                        "H24_money_h": "¥1,280.63",
                        "H24_max": "0.000864",
                        "H24_min": "0.000802",
                        "H24_num": "26.38",
                        "H24_money": "0.02",
                        "H24_change": -1.62,
                        "trade_name": "BTC"
                    },
                    {
                        "currency_logo": "http://static.bimin.vip/admin/old/uploads/2018-05-08/5af17e4410b120.96821076.png",
                        "currency_mark": "FUN",
                        "currency_trade_id": 40,
                        "currency_id": 75,
                        "price_status": "-1",
                        "new_price": "0.00000259",
                        "trade_mark": "BTC",
                        "trade_logo": "http://static.bimin.vip/admin/old/uploads/2018-03-15/5aa9d58e994573.82617081.png",
                        "cy_id": "80",
                        "h24_num": "16844.62",
                        "h24_change": -9.76,
                        "h24_money": "0.0467795721",
                        "h24_max": "3.0E-6",
                        "h24_min": "2.56E-6",
                        "first_price": "2.87E-6",
                        "krw_price": "9324150.000000000",
                        "is_chuang": 1,
                        "is_old": 0,
                        "input_price_num": 8,
                        "rate_num": 3,
                        "order_num": null,
                        "new_price_h": "¥0.146",
                        "H24_max_h": "¥0.170",
                        "H24_min_h": "¥0.145",
                        "H24_money_h": "¥2,643.51",
                        "H24_max": "0.00000300",
                        "H24_min": "0.00000256",
                        "H24_num": "16,844.62",
                        "H24_money": "0.05",
                        "H24_change": -9.76,
                        "trade_name": "BTC"
                    }
                ]
            },
            {
                "market_name": "ETH",
                "market_cid": 37,
                "logo": "",
                "content": [
                    {
                        "currency_trade_id": 37,
                        "trade_logo": "",
                        "currency_id": 77,
                        "new_price": "0.00059000",
                        "cy_id": "67",
                        "trade_mark": "ETH",
                        "currency_logo": "http://static.bimin.vip/admin/old/uploads/2018-05-16/5afc089d14deb5.62020303.png",
                        "currency_mark": "QSFC",
                        "price_status": "0",
                        "h24_num": "103.0",
                        "h24_change": 0,
                        "h24_money": "0.060770000000000005",
                        "h24_max": "5.9E-4",
                        "h24_min": "5.9E-4",
                        "first_price": "5.9E-4",
                        "krw_price": 1,
                        "is_chuang": 1,
                        "is_old": null,
                        "input_price_num": 8,
                        "rate_num": 3,
                        "order_num": 0,
                        "new_price_h": "¥0.000",
                        "H24_max_h": "¥0.000",
                        "H24_min_h": "¥0.000",
                        "H24_money_h": "¥0.00",
                        "H24_max": "0.00059000",
                        "H24_min": "0.00059000",
                        "H24_num": "103.00",
                        "H24_money": "0.06",
                        "H24_change": 0,
                        "trade_name": "ETH"
                    },
                    {
                        "currency_logo": "http://static.bimin.vip/admin/old/uploads/2018-05-08/5af17e4410b120.96821076.png",
                        "currency_mark": "FUN",
                        "currency_trade_id": 37,
                        "currency_id": 75,
                        "price_status": "0",
                        "new_price": "0.00004662",
                        "trade_mark": "ETH",
                        "trade_logo": "",
                        "cy_id": "65",
                        "h24_num": "178722.09",
                        "h24_change": -8.26,
                        "h24_money": "8.9289075216",
                        "h24_max": "5.444E-5",
                        "h24_min": "4.565E-5",
                        "first_price": "5.082E-5",
                        "krw_price": "409563.000000000",
                        "is_chuang": 1,
                        "is_old": 0,
                        "input_price_num": 8,
                        "rate_num": 3,
                        "order_num": 0,
                        "new_price_h": "¥0.116",
                        "H24_max_h": "¥0.135",
                        "H24_min_h": "¥0.113",
                        "H24_money_h": "¥22,163.33",
                        "H24_max": "0.00005444",
                        "H24_min": "0.00004565",
                        "H24_num": "178,722.09",
                        "H24_money": "8.93",
                        "H24_change": -8.26,
                        "trade_name": "ETH"
                    }
                ]
            },
            {
                "market_name": "挖矿",
                "market_cid": "mine",
                "content": [
                    {
                        "cy_id": "95",
                        "currency_id": 80,
                        "currency_trade_id": 37,
                        "currency_logo": "http://static.bimin.vip/admin/currency/2018-05-29/FUNT.jpg",
                        "trade_logo": "",
                        "currency_mark": "FUNT",
                        "trade_mark": "ETH",
                        "new_price": "0.00007900",
                        "price_status": "1",
                        "h24_num": "24000.0",
                        "h24_change": 2.6,
                        "h24_money": "1.8615",
                        "h24_max": "7.9E-5",
                        "h24_min": "7.7E-5",
                        "first_price": "7.7E-5",
                        "krw_price": "409563.000000000",
                        "is_chuang": 0,
                        "is_old": 0,
                        "input_price_num": 8,
                        "rate_num": 0,
                        "order_num": 8,
                        "new_price_h": "¥0",
                        "H24_max_h": "¥0",
                        "H24_min_h": "¥0",
                        "H24_money_h": "¥4,620.62",
                        "H24_max": "0.00007900",
                        "H24_min": "0.00007700",
                        "H24_num": "24,000.00",
                        "H24_money": "1.86",
                        "H24_change": 2.6,
                        "trade_name": "挖矿"
                    }
                ],
                "logo": "http://static.bimin.vip/admin/currency/2018-05-29/mine2.jpg"
            }
        ],
        "buy_one": "673,585",
        "sell_one": "694,320"
    }
}

响应参数说明:
buy 买单
sell 卖单
buy_one 买一价
sell_one 卖一价
trade 最近成交
currency_zd 当前交易对涨跌信息
market_zd 交易市场涨跌信息

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 212,657评论 6 492
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 90,662评论 3 385
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 158,143评论 0 348
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 56,732评论 1 284
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 65,837评论 6 386
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 50,036评论 1 291
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,126评论 3 410
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 37,868评论 0 268
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,315评论 1 303
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 36,641评论 2 327
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 38,773评论 1 341
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 34,470评论 4 333
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,126评论 3 317
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 30,859评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,095评论 1 267
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 46,584评论 2 362
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 43,676评论 2 351

推荐阅读更多精彩内容

  • Overview The ccxt library is a collection of available cr...
    郭蝈儿蝈儿阅读 3,671评论 0 1
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,637评论 18 139
  • 今天拜访了3个行业内的朋友,主要是为明年招商部提前做好人才储备。 下午3点到翰明阳接海星,从4点一直分享到7点。这...
    陈锦鸿立阳企业阅读 186评论 0 2
  • 网友来信: 我跟前任是初恋,但是谈了一年多就分手了,因为他的控制欲太强,就连我穿什么,梳什么发型他都会管,我受不了...
    柠檬心理阅读 378评论 0 0
  • 因为喜欢一部电视剧,憋屎憋尿。 因为喜欢一部电视剧,不吃不喝。 因为喜欢一部电视剧,停笔追剧。
    云夕何兮阅读 749评论 6 3