"exch_type": "yellow" #rate will fix for 10 minutes
"exch_type": "green" #the rate is fixed at the moment payment is received
const fetch = require('node-fetch');
let url = 'https://api.yellowchanger.com/trades/createTrade';
let options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Y_API_KEY: 'Your API Key',
Signature: '0002b135569a4a29b7e7bf9489114eca8fa31e7f61a9e8e26b89bb7dfd4dcf5c'
},
body: '{"send_name":"USDT","get_name":"USDT","send_value":100,"send_network":"TRC20","get_network":"ERC20", "uniq_id":"nf4i3rh394h", "get_creds":"address, card or number"}'
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
var axios = require("axios").default;
var options = {
method: 'POST',
url: 'https://api.yellowchanger.com/trades/createTrade',
headers: {
'Content-Type': 'application/json',
Y_API_KEY: 'Your API Key',
Signature: '0002b135569a4a29b7e7bf9489114eca8fa31e7f61a9e8e26b89bb7dfd4dcf5c'
},
data: {
send_name: 'USDT',
get_name: 'USDT',
send_value: 100,
send_network: 'TRC20',
get_network: 'ERC20',
uniq_id: 'nf4i3rh394h',
get_creds: 'address, card or number'
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});
import requests
url = "https://api.yellowchanger.com/trades/createTrade"
payload = {
"send_name": "USDT",
"get_name": "USDT",
"send_value": 100,
"send_network": "TRC20",
"get_network": "ERC20",
"uniq_id": "nf4i3rh394h",
"get_creds": "address, card or number"
}
headers = {
"Content-Type": "application/json",
"Y_API_KEY": "Your API Key",
"Signature": "0002b135569a4a29b7e7bf9489114eca8fa31e7f61a9e8e26b89bb7dfd4dcf5c"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
curl --request POST \
--url https://api.yellowchanger.com/trades/createTrade \
--header 'Content-Type: application/json' \
--header 'Signature: 0002b135569a4a29b7e7bf9489114eca8fa31e7f61a9e8e26b89bb7dfd4dcf5c' \
--header 'Y_API_KEY: Your API Key' \
--data '{"send_name": "USDT", "get_name": "USDT", "send_value": 100, "send_network": "TRC20", "get_network": "ERC20", "uniq_id": "nf4i3rh394h", "get_creds": "address, card or number"}'