etf接口

作者: sekaiamber | 来源:发表于2018-08-01 14:16 被阅读0次

获取所有产品

GET /web/etf/products.json

返回例子:

{
    "success":true,
    "data":[
        {
            "id":1,
            "name":"BAI",
            "period":{
                "id":1,
                "state":"selling",
                "start_at":1532523600,
                "end_at":1535634000,
                "amount":"100000",
                "bought":"5013.0",
                "nper":1,
                "can_buy":true
            }
        },
        {
            "id":2,
            "name":"BAI+",
            "period":{
                "id":2,
                "state":"selling",
                "start_at":1532523600,
                "end_at":1535634000,
                "amount":"100000",
                "bought":"3647.0",
                "nper":1,
                "can_buy":true
            }
        }
    ]
}

其中period字段为期数,里面amount表示本期总共额度,bought表示已经生效的额度,nper表示第几期。

获取点数据

GET /web/etf/points/${id}?from=${from}&to=${to}

例子:

GET http://staging.bitrabbit.io/web/etf/points/1?from=2018-04-03&to=2018-08-01?locale=zh-CN
{
    "success":true,
    "data":{
        "name":"BAI",
        "first_price":"1.14",
        "last_price":"1.589",
        "points":[
            {
                "at":1522771200,
                "price":"1.13"
            },
            {
                "at":1522857600,
                "price":"1.13"
            }
        ]
    }
}

获取用户所有订单

GET /web/etf/orders.json

例子:

{
    "success":true,
    "data":[
        {
            "id":35,
            "state":"submitted",
            "active_time":0,
            "redeem_time":0,
            "volume":null,
            "amount":"2.0",
            "product_name":"BAI+",
            "product_id":2,
            "avg_price":null,
            "avg_end_price":null,
            "memo":null,
            "currency":"USDT",
            "created_at":"2018-07-31T11:24:02.000+08:00",
            "nper":1
        },
        {
            "id":34,
            "state":"submitted",
            "active_time":0,
            "redeem_time":0,
            "volume":null,
            "amount":"1.0",
            "product_name":"BAI",
            "product_id":1,
            "avg_price":null,
            "avg_end_price":null,
            "memo":null,
            "currency":"USDT",
            "created_at":"2018-07-31T11:23:46.000+08:00",
            "nper":1
        }
    ]
}

其中以product_id来区分对应哪个产品。state枚举如下:

{
  "etf_state_submitting": "提交中",
  "etf_state_submitted": "申购中",
  "etf_state_rejected": "已拒绝",
  "etf_state_executed": "已生效",
  "etf_state_redeeming": "赎回中",
  "etf_state_redeemed": "已赎回"
}

avg_price是生效时的均价,avg_end_price是赎回时的均价,amount是USDT数量,volume是订单的BAI份额。

用户下订单

POST /web/etf/orders.json

例子:

入参

{
    "amount":"100",
    "currency":"USDT",
    "product_id":2,
    "period_id":1,
    "locale":"zh-CN"
}

表示花费100``USDT购买product_id2的产品,期数id为1

相关文章

  • etf接口

    获取所有产品 返回例子: 其中period字段为期数,里面amount表示本期总共额度,bought表示已经生效的...

  • 2020-07-04

    目前主要的ETF基金大类有:指数ETF、债券ETF、货币ETF、商品ETF、跨境ETF。 而风险排列的顺序大致如下...

  • ETF全球投资指南收获

    1、通过本书学习了解到的全球ETF包括美股ETF、非美股市场ETF,商品ETF、债券ETF和增强型ETF。 2、标...

  • 2018定投标的

    中证500ETF 上证50ETF 证券ETF

  • 场内基金ETF

    ETF分为很多类型,有大盘指数ETF,中盘指数ETF,小盘指数ETF。 大盘指数有沪深300,上证50,中盘指数有...

  • ETF:小散资产配置利器

    ETF是我国基金的一种,从交易机制来看,ETF主要有两类,分别为场外ETF和场内ETF。其中场外ETF通过在基金销...

  • 请生动浅显的科普一下ETF基金?

    看完这篇,你就将彻底知道:什么是ETF,什么是ETF链接基金,还有就是ETF和ETF链接基金之间有什么关系呢? 什...

  • ETF与ETF联接基金

    上周在做基金对比时,小双同学问为什么不用ETF基金做例子而是用ETF联接? 其实ETF和ETF联接都是跟踪指数的基...

  • 不要炒股票21:指数ETF与行业ETF

    ETF种类很多,当然也会有所不同。这里只讨论指数ETF和行业ETF。 先说结论,我只做宽基指数ETF。花车理论只支...

  • 上证50ETF场内期权

    上证50ETF场内期权 50ETF交易基础知识 上证50ETF期权概念有...

网友评论

      本文标题:etf接口

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