cryptoexchange icon indicating copy to clipboard operation
cryptoexchange copied to clipboard

✨ Implement Paradex Ticker, Order book and Trades

Open Swingcloud opened this issue 6 years ago • 0 comments

  • What is the purpose of this Pull Request? as title
  • What is the related issue for this Pull Request? #411
  • [x] I have added Specs
  • [x] (If implementing Market Ticker) I have verified that the volume refers to BASE
  • [x] (If implementing Market Ticker) I have verified that the base and target is assigned correctly

ticker WETH/DAI:

// this is on ticker endpoint
{
    "last": "614.35",
    "bid": "606.04455",
    "ask": "612.4872"
}
// this is on ohlcv endpoint
[
    {
        "date": "2018-04-21T00:00:00Z",
        "open": "616.771310000000000000",
        "high": "614.350000000000000000",
        "low": "614.350000000000000000",
        "close": "614.350000000000000000",
        "volume": "5.000000000000000000"
    }
] 

and I assume this volume is base volume

order book

{
    "marketId": 10,
    "marketSymbol": "WETH/DAI",
    "bids": [
        {
            "price": "607.7858",
            "amount": "1.89211"
        },
        {
            "price": "605.04108",
            "amount": "8.2639"
        }
    ],
    "asks": [
        {
            "price": "612.4872",
            "amount": "2.3"
        },
        {
            "price": "614.46397",
            "amount": "10"
        }
    ]
}

trades

{
    "count": 3849,
    "trades": [
        {
            "id": 8160,
            "created": "2018-04-21T00:33:58Z",
            "completed": "2018-04-21T00:36:36Z",
            "type": "buy",
            "price": "614.35",
            "amount": "1.8",
            "total": "1105.83",
            "market": "WETH/DAI",
            "state": "confirmed"
        },
        {
            "id": 8159,
            "created": "2018-04-21T00:33:46Z",
            "completed": "2018-04-21T00:35:32Z",
            "type": "buy",
            "price": "614.35",
            "amount": "3.2",
            "total": "1965.92",
            "market": "WETH/DAI",
            "state": "confirmed"
        }
    ]
}

Swingcloud avatar Apr 21 '18 05:04 Swingcloud