This endpoint is used to place orders and currently supports only the USDT/ARS pair.
https://api.exchangecopter.com/apiTrade
POST
import axios from 'axios';
const Trade = async () => {
const data = {
side: "buy or sell",
documentId: "receiver-bankAccountCBU/CVU",
wallet: "USDT Polygon wallet where API will send crypto", // This is only needed if side = buy.
currency: "usdt or ars", //If side is buy then this must be ars, if side is sell this must be usdt.
amount: "string" // If side is but then the amount should be expresssed in ARS, if side is sell amount should be expressed in USDT. Can only add up to 2 decimals.
};
const config = {
method: 'post',
url: 'https://api.exchangecopter.com/apiTrade',
headers: {
'Authorization': 'Bearer YOUR_TOKEN_HERE', // Replace with the actual token
'Content-Type': 'application/json'
},
data: data
};
try {
const response = await axios(config);
console.log("Trade Success:", response.data);
} catch (error) {
console.error("Trade Error:", error);
}
};
200 Response
{
"side": "sell",
"documentId": "ajdkhasdjknwqjikbn",
"currency": "usdt",
"amount": "1",
"conversionPrice": 1180.53,
"arsSoldClient": 1180.53
}
or
{
"side": "buy",
"documentId": "ajdkhasdjknwqjikbn",
"wallet": "address",
"currency": "ars",
"amount": "3000",
"conversionPrice": 1221.70,
"usdtBoughtClient": 2.45
}