dparlevliet / node.bittrex.api

Node Bittrex API is an asynchronous node.js library for the Bittrex API, the data can be received either via GET request or Stream.
MIT License
253 stars 100 forks source link

It's there a way to get the BTC- USD Price that Bittrex uses? #53

Closed gerardo15 closed 6 years ago

gerardo15 commented 7 years ago

On the website you can see.

1 BTC = $7444.2963

is it posible to get that value from the api?

dparlevliet commented 7 years ago

The Bittrex website uses the API call https://bittrex.com/Api/v2.0/pub/currencies/GetBTCPrice -- we don't currently have this as a standalone function but we can add it.

Notes for implementation:

response:

{
    "success": true,
    "message": "",
    "result": {
        "time": {
            "updated": "Nov 6, 2017 05:34:00 UTC",
            "updatedISO": "2017-11-06T05:34:00+00:00",
            "updateduk": "Nov 6, 2017 at 05:34 GMT"
        },
        "disclaimer": "This data was produced from the CoinDesk Bitcoin Price Index (USD). Non-USD currency data converted using hourly conversion rate from openexchangerates.org",
        "bpi": {
            "USD": {
                "code": "USD",
                "rate": "7,269.2263",
                "description": "United States Dollar",
                "rate_float": 7269.2263
            }
        }
    }
}
gerardo15 commented 7 years ago

Nice.

How did you find it? I cannot find the API V2 documentation anywhere

dparlevliet commented 7 years ago

Correct, there's no documentation because it's not yet officially release - I've been using the Chrome developer tools.

nguyenhmp commented 6 years ago

hey dparlevliet, This is old but was wondering if you could guide me on how you figured out the endpoints of the api. Thought I would try and ask! Thanks ahead for the library!

Revetter commented 6 years ago

In chrome->inspect (on bittrex.com ofc), go to network tab, reload page (filter on XHR and fetch) and you'll see it right there.