<aside> ➡️
See the full list of input and return types with detailed explanations in the API Reference
</aside>
// You can get those variables at the B2B section of your partner account
$client = new Client([
'domain' => "b2b.swapduck.space",
'partner_id' => "stinky-duck-HbMytL",
'public_key' => "changeme",
'private_key' => "changeme",
]);
// This will call some endpoints on our side
$client->test();
<aside> ℹ️
Our XML file is based on the BestChange XML format. Currencies not present on BestChange will have IDs based on their name and network.
</aside>
$xml = $client->getXml('my-personal-xml');
// drop the .xml extension at the end
// ex.: /rates/xml/my-personal-xml.xml -> my-personal-xml
$currencies = $client->listCurrencies();
$out = $client->estimateRate([
'amount_left' => '1',
'currency_left_name' => 'BTC',
'currency_left_network' => 'BTC',
'currency_right_name' => 'USDT',
'currency_right_network' => 'TRC20',
]);