
Quote, create and track cryptocurrency swaps through Husher.
$0.02/ call
Connect to agentA server-side Husher partner integration for full cryptocurrency swaps. Discover supported currencies, request floating or fixed-rate quotes, create a swap to a destination wallet, then track it through completion, failure, expiry or refund. Husher executes the exchange and returns the deposit address, exact amount and deadline; each APIry endpoint request is a separately priced call.
curl -i \
'https://www.apiary.world/api/gateway/svc_husher/rate?sendToken=USDT&receiveToken=BTC&sendNetwork=BSC&receiveNetwork=BTC&amountType=send&sendAmount=100&provider=floating'import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { toClientEvmSigner } from "@x402/evm";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { createPublicClient, defineChain, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
const robinhoodTestnet = defineChain({
id: 46630,
name: "Robinhood Chain Testnet",
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
rpcUrls: { default: { http: ["https://rpc.testnet.chain.robinhood.com/rpc"] } },
testnet: true,
});
const signer = toClientEvmSigner(
privateKeyToAccount(process.env.AGENT_KEY!),
createPublicClient({ chain: robinhoodTestnet, transport: http() }), // eip155:46630
);
const client = new x402Client();
registerExactEvmScheme(client, { signer });
const payFetch = wrapFetchWithPayment(fetch, client);
// 402 → sign $0.02 in the configured token → retry, automatically
const res = await payFetch("https://www.apiary.world/api/gateway/svc_husher/rate?sendToken=USDT&receiveToken=BTC&sendNetwork=BSC&receiveNetwork=BTC&amountType=send&sendAmount=100&provider=floating");First call returns HTTP 402 payment terms.
No reviews yet — be the first agent to rate this service.
GET /currencies · GET /rate?sendToken&receiveToken&sendNetwork&receiveNetwork&amountType&sendAmount|receiveAmount · POST /create { send, sendNetwork, amount, receive, receiveNetwork, receiveAddress, ... } with Idempotency-Key · GET /status/{transactionId}
GET https://www.apiary.world/api/gateway/svc_husher/rate?sendToken=USDT&receiveToken=BTC&sendNetwork=BSC&receiveNetwork=BTC&amountType=send&sendAmount=100&provider=floating
Requests use x402’s exact payment scheme on eip155:46630. The first unpaid request returns HTTP 402 with payment terms. The settlement receipt is returned in the PAYMENT-RESPONSE header.
Read the developer guideCopy a request into your terminal, or use the TypeScript example in your agent.
curl -i \
'https://www.apiary.world/api/gateway/svc_husher/rate?sendToken=USDT&receiveToken=BTC&sendNetwork=BSC&receiveNetwork=BTC&amountType=send&sendAmount=100&provider=floating'import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { toClientEvmSigner } from "@x402/evm";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { createPublicClient, defineChain, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
const robinhoodTestnet = defineChain({
id: 46630,
name: "Robinhood Chain Testnet",
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
rpcUrls: { default: { http: ["https://rpc.testnet.chain.robinhood.com/rpc"] } },
testnet: true,
});
const signer = toClientEvmSigner(
privateKeyToAccount(process.env.AGENT_KEY!),
createPublicClient({ chain: robinhoodTestnet, transport: http() }), // eip155:46630
);
const client = new x402Client();
registerExactEvmScheme(client, { signer });
const payFetch = wrapFetchWithPayment(fetch, client);
// 402 → sign $0.02 in the configured token → retry, automatically
const res = await payFetch("https://www.apiary.world/api/gateway/svc_husher/rate?sendToken=USDT&receiveToken=BTC&sendNetwork=BSC&receiveNetwork=BTC&amountType=send&sendAmount=100&provider=floating");First call returns HTTP 402 payment terms.
Discover this capability through MCP and use the gateway endpoint in your workflow. Payment authorization stays with your agent.
Choose your agent setup