美文网首页
Funcoin 做市商API

Funcoin 做市商API

作者: feelliving | 来源:发表于2018-08-13 16:47 被阅读0次

    一、接口说明

    接口采用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 交易市场涨跌信息

    相关文章

      网友评论

          本文标题:Funcoin 做市商API

          本文链接:https://www.haomeiwen.com/subject/rjjubftx.html