Crypto
Retrieving crypto information.
Retrieving crypto
Every affiliate id has cryptos visible only to the user of the id.
To access the crypto information, the /crypto route will be used.
The following examples will return: an JSON encoded response containing the cryptos, token and refresh token.
Curl Example
curl --header "Content-Type: application/json" \ --request GET \ --data '{"access_token": "test_access_token" }' \ https://quinix.byteconnect.us/cryptos
Python Example
import requests
from os import getenv
access_token = getenv("access_token")
body = {"access_token" : access_token }
url = getenv("bytefederal_api_url")
request = requests.post(f"{url}/cryptos", json=body)
response = request.json()
print(response)
NodeJs Example
async function GetCryptoByAffiliateID() {
const accessToken = process.env.ACCESSTOKEN;
const bodyData = {
"access_token": accessToken
}
const url = `${process.env.BYTECONNECTURL}/cryptos`;
const request = await fetch(url, {
method: "POST",
body=JSON,stringify(bodyData),
headers: {
"Content-Type": "application/json"
}
}
);
const response = await request.json();
console.log(response);
}
HTTP Codes
200
Returns a JSON encoded response containing the cryptos, and access token,
401
Token is not correct.
Retrieving crypto prices
To receive the prices of the cryptos offered by ByteConnect, the /crypto_prices route will need to be used.
Curl Example
curl --header "Content-Type: application/json" \ --request GET \ https://quinix.byteconnect.us/crypto_prices
Python Example
import requests
from os import getenv
url = getenv("bytefederal_api_url")
request = requests.get(f"{url}/crypto_prices", json=body)
response = request.json()
print(response)
NodeJs Example
async function Coins() {
const url = `${process.env.BYTECONNECTURL}/crypto_prices`;
const request = await fetch(url, {
method: "GET",
headers: {
"Content-Type": "application/json"
}
}
);
const response = await request.json();
console.log(response);
}
HTTP Codes
200
Returns a JSON encoded response containing the cryptos, and access token.
401
Token is not correct.
Supported types of crypto
Currently ByteConnect support the following crypto: BTC, DASH, MARS, LTC, BCH.