Cross-chain Metaspace Interface
Wallet Delegated TransactionTry API
POST
chain_dexSwap
(Wallet Delegated Transaction)
description:The user must delegate a certain amount of tokens to the specified exchange before placing orders there.
Parameters
address contractaddress
addr1 delegateaddress(exchange)
amount delegateamount(hex)
Example Code
{
"jsonrpc": "3.0",
"method": "chain_dexSwap",
"params": [
"opcode=ActiveRobot&subcode=ApproveSubmit&address=&addr1=&amount=",
"encryp=none"
],
"id": "aa80aa0c6bb0c7d81ac7e5b3"
}{
"jsonrpc": "3.0",
"id": "aa80aa0c6bb0c7d81ac7e5b3",
"result": {
"ret": "0",
"err": "",
"content": {
"txhash": "0x6885997ca51fa08ffded573088b0c5c294652ec842ac7f3182d32e30ce261025"
}
}
}