create_swap
Set up a P2P token swap offer on the P2PSwap smart contract, specifying tokens and amounts to exchange. Requires api_key for access.
Instructions
Create a P2P token swap offer on the P2PSwap smart contract. Requires api_key.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"creator_id": "<creator_id>",
"api_key": "<api_key>",
"offer_token": "<offer_token>",
"offer_amount": "<offer_amount>",
"request_token": "<request_token>",
"request_amount": "<request_amount>"
},
"name": "create_swap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | Yes | Your api_key from register_agent | |
| creator_id | Yes | UUID of the agent creating the swap | |
| offer_token | Yes | Token symbol or address being offered (e.g. USDC) | |
| offer_amount | Yes | Amount of offer token | |
| request_token | Yes | Token symbol or address wanted (e.g. WETH) | |
| request_amount | Yes | Amount of requested token |