Example 1: save
import requests
session = requests.session()
session.auth = ("publicKey", "secretKey")
b = session.get('https://api.hitbtc.com/api/2/margin/account/BTCUSD').json()
print(b)
Example 2: save
curl -X GET -u "publicKey:secretKey" \
"https://api.hitbtc.com/api/2/margin/account/BTCUSD"
Example 3: save
import requests
session = requests.session()
session.auth = ("publicKey", "secretKey")
b = session.delete('https://api.hitbtc.com/api/2/margin/account').json()
print(b)
Example 4: save
{
"address": "NXT-G22U-BYF7-H8D9-3J27W",
"publicKey": "f79779a3a0c7acc75a62afe8125de53106c6a19c1ebdf92a3598676e58773df0"
}
Example 5: save
import requests
session = requests.session()
session.auth = ("publicKey", "secretKey")
b = session.get('https://api.hitbtc.com/api/2/margin/account').json()
print(b)
Example 6: save
[ { "@id": "_:b7iddOtlocdOtgovauthoritiessubjectssh00001030", "@type": [ "http://www.w3.org/2008/05/skos-xl#Label" ], "http://www.w3.org/2008/05/skos-xl#literalForm": [ { "@language": "en",
"@value": "Users of computers" } ] }, { "@id": "_:b31iddOtlocdOtgovauthoritiessubjectssh00001030", "@type": [ "http://purl.org/vocab/changeset/schema#ChangeSet" ], "http://purl.org/vocab/changeset/schema#subjectOfChange": [ { "@id": "http://id.loc.gov/authorities/subjects/sh00001030" } ], "http://purl.org/vocab/changeset/schema#creatorName": [ { "@id": "http://id.loc.gov/vocabulary/organizations/dlc" } ], "http://purl.org/vocab/changeset/schema#createdDate": [ { "@type": "http://www.w3.org/2001/XMLSchema#dateTime",
"@value": "2014-03-10T12:29:55" } ], "http://purl.org/vocab/changeset/schema#changeReason": [ { "@type": "http://www.w3.org/2001/XMLSchema#string",
"@value": "revised" } ] }, { "@id": "http://id.loc.gov/authorities/subjects/sh00001030", "@type": [ "http://www.w3.org/2004/02/skos/core#Concept" ], "http://www.w3.org/2004/02/skos/core#prefLabel": [ { "@language": "en",
"@value": "Computer users" } ], "http://www.w3.org/2008/05/skos-xl#altLabel": [ { "@id": "_:b7iddOtlocdOtgovauthoritiessubjectssh00001030" } ], "http://www.w3.org/2004/02/skos/core#broader": [ { "@id": "http://id.loc.gov/authorities/subjects/sh85100163" } ], "http://www.w3.org/2004/02/skos/core#narrower": [ { "@id": "http://id.loc.gov/authorities/subjects/sh98003697" }, { "@id": "http://id.loc.gov/authorities/subjects/sh2007003608" }, { "@id": "http://id.loc.gov/authorities/subjects/sh00003129" }, { "@id": "http://id.loc.gov/authorities/subjects/sh94005931" } ], "http://www.w3.org/2004/02/skos/core#related": [ { "@id": "http://id.loc.gov/authorities/subjects/sh2006007865" } ], "http://www.w3.org/2004/02/skos/core#closeMatch": [ { "@id": "http://id.worldcat.org/fast/872681" }, { "@id": "http://www.wikidata.org/entity/Q278368" } ], "http://www.w3.org/2004/02/skos/core#inScheme": [ { "@id": "http://id.loc.gov/authorities/subjects" } ], "http://www.w3.org/2004/02/skos/core#altLabel": [ { "@language": "en",
"@value": "Users of computers" } ], "http://www.w3.org/2004/02/skos/core#changeNote": [ { "@id": "_:b23iddOtlocdOtgovauthoritiessubjectssh00001030" }, { "@id": "_:b31iddOtlocdOtgovauthoritiessubjectssh00001030" } ] }, { "@id": "_:b23iddOtlocdOtgovauthoritiessubjectssh00001030", "@type": [ "http://purl.org/vocab/changeset/schema#ChangeSet" ], "http://purl.org/vocab/changeset/schema#subjectOfChange": [ { "@id": "http://id.loc.gov/authorities/subjects/sh00001030" } ], "http://purl.org/vocab/changeset/schema#creatorName": [ { "@id": "http://id.loc.gov/vocabulary/organizations/dlc" } ], "http://purl.org/vocab/changeset/schema#createdDate": [ { "@type": "http://www.w3.org/2001/XMLSchema#dateTime",
"@value": "2000-01-04T00:00:00" } ], "http://purl.org/vocab/changeset/schema#changeReason": [ { "@type": "http://www.w3.org/2001/XMLSchema#string",
"@value": "new" } ] } ]
Example 7: save
curl -X GET -u "publicKey:secretKey" \
"https://api.hitbtc.com/api/2/margin/account"
Example 8: save
curl -X GET -u "publicKey:secretKey" \
"https://api.hitbtc.com/api/2/account/crypto/address/NXT"
Example 9: save
[
{
"id": 9535486,
"orderId": 816088377,
"clientOrderId": "f8dbaab336d44d5ba3ff578098a68454",
"symbol": "ETHBTC",
"side": "sell",
"quantity": "0.061",
"price": "0.045487",
"fee": "0.000002775",
"timestamp": "2017-05-17T12:32:57.848Z"
},
{
"id": 9535437,
"orderId": 816088021,
"clientOrderId": "27b9bfc068b44194b1f453c7af511ed6",
"symbol": "ETHBTC",
"side": "buy",
"quantity": "0.038",
"price": "0.046000",
"fee": "-0.000000174",
"timestamp": "2017-05-17T12:30:57.848Z"
}
]
Example 10: save
$user = 'root';
$password = 'root';
$db = 'inventory';
$host = 'localhost';
$port = 8000;
$link = mysql_connect(
"$host:$port",
$user,
$password
);
$db_selected = mysql_select_db(
$db,
$link
);