Skip to content
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)

address contractaddress

addr1 accountaddress

Return Values

Returns all delegated information for the token

Example Code
Request
{
"jsonrpc": "3.0",
"method": "chain_dexSwap",
"params": [
  "opcode=ActiveRobot&subcode=ApproveSubmit&address=&addr1=&amount=",
  "encryp=none"
],
"id": "aa80aa0c6bb0c7d81ac7e5b3"
}
Response 1
{
 "jsonrpc":  "3.0",
 "id":  "aa80aa0c6bb0c7d81ac7e5b3",
 "result": {
   "ret":  "0",
   "err":  "",
   "content": {
     "txhash":  "0x6885997ca51fa08ffded573088b0c5c294652ec842ac7f3182d32e30ce261025"
  }
}
}
Response 2
{
 "jsonrpc":  "3.0",
 "id":  "3e4196af78cc3078dc6327cc",
 "result": {
   "ret":  "0",
   "err":  "",
   "content": {
     "Address": [
       "0x93ee2635c514af8c259b49fbbc103f9186d27323"
    ],
     "Amount": [
       528
    ]
  }
}
}

On this page