keys code example

Example 1: keys

import requests
session = requests.session()
session.auth = ("publicKey", "secretKey")
b = session.get('https://api.hitbtc.com/api/2/order/c1837634ef81472a9cd13c81e7b91401').json()
print(b)

Example 2: keys

curl -X GET -u "publicKey:secretKey" \
     "https://api.hitbtc.com/api/2/order/c1837634ef81472a9cd13c81e7b91401"

Example 3: keys

import requests
session = requests.session()
session.auth = ("publicKey", "secretKey")
b = session.get('https://api.hitbtc.com/api/2/order').json()
print(b)

Example 4: keys

curl -X GET -u "publicKey:secretKey" \
     "https://api.hitbtc.com/api/2/order"

Example 5: keys

{
  "id": 828680665,
  "clientOrderId": "f4307c6e507e49019907c917b6d7a084",
  "symbol": "ETHBTC",
  "side": "sell",
  "status": "partiallyFilled",
  "type": "limit",
  "timeInForce": "GTC",
  "quantity": "13.942",
  "price": "0.011384",
  "cumQuantity": "5.240",
  "createdAt": "2017-01-16T14:18:47.321Z",
  "updatedAt": "2017-01-19T15:23:54.876Z",
  "postOnly": false
}

Example 6: keys

[
      {
        "currency": "ETH",
        "available": "10.000000000",
        "reserved": "0.560000000"
      },
      {
        "currency": "BTC",
        "available": "0.010205869",
        "reserved": "0"
      }
    ]

Example 7: keys

import requests
session = requests.session()
session.auth = ("publicKey", "secretKey")
b = session.get('https://api.hitbtc.com/api/2/trading/balance').json()
print(b)

Example 8: keys

curl -X GET -u "publicKey:secretKey" \
     "https://api.hitbtc.com/api/2/trading/balance"

Example 9: keys

const fetch = require('node-fetch');

const credentials = Buffer.from('publicKey' + ':' + 'secretKey').toString('base64');

fetch('https://api.hitbtc.com/api/2/trading/balance', {
    method: 'GET',
    headers: {
        'Authorization': 'Basic ' + credentials
    }
});

Example 10: keys

b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291

Tags:

Misc Example