Depending on the request, you may have to use at least one of them or none at all. Look under Request -> Headers section under each endpoint to find out if an endpoint requires authorization.
X-REQUEST-SIGNATURE
X-REQUEST-SIGNATURE header is used to verify the ownership of an address, usually, for GET requests. The value of the header must be the signature of an address that you own. Follow the guide below to generate an Address Signature.
Then, you can generate the value of the header like below:
// example key and secret
var key = 'abcd';
var secret = '1234';
var data = key + ':' + secret;
var encodedBytes = Buffer.from(data);
// this is Base64 Encoded API Keys
var encodedString = encodedBytes.toString('base64');
// you should get 'YWJjZDoxMjM0' from the example values
console.log(encodedString)
import base64
# example key and secret
key = 'abcd'
secret = '1234'
data = '%s:%s' % (key, secret)
encodedBytes = base64.b64encode(data.encode('utf-8'))
# this is Base64 Encoded API Keys
encodedString = encodedBytes.decode('utf-8')
# you should get 'YWJjZDoxMjM0' from the example values
print(encodedString)
using System;
using System.Text;
...
string apiKey = "abcd";
string apiSecret = "1234";
// token's value is YWJjZDoxMjM0
string token = Convert.ToBase64String(Encoding.UTF8.GetBytes($"{apiKey}:{apiSecret}"));