# Get Bit Price using Twitch API

**URL:** <https://staging-discuss.dev.twitch.com/t/get-bit-price-using-twitch-api/13777>\
**Category:** API\
**Created:** [January 15, 2018, 11:26pm UTC](https://staging-discuss.dev.twitch.com/t/get-bit-price-using-twitch-api/13777 "2018-01-15T23:26:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![spawnhubtv](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@spawnhubtv](https://staging-discuss.dev.twitch.com/u/spawnhubtv)\
**Post date:** [January 15, 2018, 11:26pm UTC](https://staging-discuss.dev.twitch.com/t/get-bit-price-using-twitch-api/13777/1 "2018-01-15T23:26:55Z")

</div>

Is there a way I can get the current Twitch Bit Price via the api? I want to build a currency converter as a little project.

If not. Does the Bit price ever change?

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://staging-discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [January 16, 2018, 4:18pm UTC](https://staging-discuss.dev.twitch.com/t/get-bit-price-using-twitch-api/13777/2 "2018-01-16T16:18:08Z")

</div>

> [@spawnhubtv](#):
>
> Is there a way I can get the current Twitch Bit Price via the api?

No

> [@spawnhubtv](#):
>
> If not. Does the Bit price ever change?

Nope

Basically it’s 1:1 1 bit is 1 cent for the streamer, viewers are charged a fee on top when they purchase the bits from Twitch.

Twitch _probably_ isn’t in the market of letting people work this out offsite really…

---

<div class="post-metadata">

**Author:** ![TheElm](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/theelm/32/2911_2.png) [@TheElm](https://staging-discuss.dev.twitch.com/u/TheElm)\
**Post date:** [January 17, 2018, 12:05am UTC](https://staging-discuss.dev.twitch.com/t/get-bit-price-using-twitch-api/13777/3 "2018-01-17T00:05:16Z")

</div>

Actually this seems to be possible, as is triggered when clicking the “Get Bits” button above any twitch stream.

Albeit the endpoint being undocumented and therefore 100% unreliable.

```javascript
var clientID = "";

var myObj = [
  {
    operationName: "GetBitsButton_Bits",
    query: "query GetBitsButton_Bits() {\n bitsOffers {\n ...bitsOffersFragment\n __typename\n }\n}\n\nfragment bitsOffersFragment on BitsOffer {\n id\n type\n bits\n ... on BitsBundleOffer {\n price\n discount\n }\n__ typename\n}"
  }
];
$.ajax({
  url: "https://gql.twitch.tv/gql",
  method: "POST",
  headers: {
    "Client-ID": clientID
  },
  data: JSON.stringify( myObj )
});

```

Returns

```json
[
  {
    "data": {
      "bitsOffers": [
        {
          "id": "B017L2UX4C",
          "type": "BUNDLE",
          "bits": 100,
          "price": "$1.40",
          "discount": 0,
          "__typename": "BitsBundleOffer"
        },
        {
          "id": "B018WMZKR0",
          "type": "BUNDLE",
          "bits": 500,
          "price": "$7.00",
          "discount": 0,
          "__typename": "BitsBundleOffer"
        },
        {
          "id": "B073RTRHTZ",
          "type": "BUNDLE",
          "bits": 1000,
          "price": "$10.00",
          "discount": 0.27,
          "__typename": "BitsBundleOffer"
        },
        {
          "id": "B018WMZN5E",
          "type": "BUNDLE",
          "bits": 1500,
          "price": "$19.95",
          "discount": 0.05,
          "__typename": "BitsBundleOffer"
        },
        {
          "id": "B018WMZSPY",
          "type": "BUNDLE",
          "bits": 5000,
          "price": "$64.40",
          "discount": 0.08,
          "__typename": "BitsBundleOffer"
        },
        {
          "id": "B018WMZYPI",
          "type": "BUNDLE",
          "bits": 10000,
          "price": "$126.00",
          "discount": 0.1,
          "__typename": "BitsBundleOffer"
        },
        {
          "id": "B01G4BISOS",
          "type": "BUNDLE",
          "bits": 25000,
          "price": "$308.00",
          "discount": 0.12,
          "__typename": "BitsBundleOffer"
        }
      ]
    },
    "extensions": {
      "durationMilliseconds": 884,
      "operationName": "GetBitsButton_Bits"
    }
  }
]

```

---

<div class="post-metadata">

**Author:** ![3ventic](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/3ventic/32/298_2.png) [@3ventic](https://staging-discuss.dev.twitch.com/u/3ventic)\
**Post date:** [January 17, 2018, 4:44pm UTC](https://staging-discuss.dev.twitch.com/t/get-bit-price-using-twitch-api/13777/4 "2018-01-17T16:44:56Z")

</div>

> [@TheElm](#):
>
> Albeit the endpoint being undocumented and therefore 100% unreliable.

Very much so.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://staging-discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [January 18, 2018, 9:15am UTC](https://staging-discuss.dev.twitch.com/t/get-bit-price-using-twitch-api/13777/5 "2018-01-18T09:15:13Z")

</div>

> [@TheElm](#):
>
> Actually this seems to be possible, as is triggered when clicking the “Get Bits” button above any twitch stream.

And doesn’t take in account VAT/Sales Tax additions…

---

<div class="post-metadata">

**Author:** ![system](https://d2spem0quai2ol.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://staging-discuss.dev.twitch.com/u/system)\
**Post date:** [February 17, 2018, 9:15am UTC](https://staging-discuss.dev.twitch.com/t/get-bit-price-using-twitch-api/13777/6 "2018-02-17T09:15:20Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
