Links

Cancel DEX Order

JavaScript
Python
const actions = [
{
// Dex Smart Contract
"account": "dex",
// Action name
"name": "cancelorder",
// Action data
"data": {
"account": username,
"order_id": 23
},
authorization
},
{
account: 'dex',
name: "withdrawall",
data: {
account: username,
},
authorization
},
]
const main = async () => {
await transact(actions)
}
main()
args1 = {
# Trading account
"account": "user1",
# ID of order
"order_id": 1765,
}
args2 = {
# Trading account
"account": "user1",
}
permission = {'user1':'active'}
a1 = ['dex', 'cancelorder', args1, permission]
a2 = ['dex', 'withdrawall', args2, permission]
eosapi.push_actions([a1, a2])