On this page

latest contributor to this doc

Last Edit:

@gcharang

disable_coin

disable_coin coin

The disable_coin method deactivates the previously enabled coin, and also cancels all active orders that use the selected coin. The method will return an error in the following cases:

  • The coin is not enabled
  • The coin is used by active swaps
  • The coin is used by a currently matching order. In this case, other orders might still be cancelled

StructureTypeDescription
coinstringthe ticker of coin to disable

StructureTypeDescription
coinstringthe ticker of deactivated coin
cancelled_ordersarray of stringsuuids of cancelled orders
swapsarray of stringsuuids of active swaps that use the selected coin; present only in error cases
orders.matchingarray of stringsuuids of matching orders that use the selected coin; present only in error cases
orders.cancelledarray of stringsuuids of orders that were successfully cancelled despite the error

POST
disable_coin
{
  "userpass": "RPC_UserP@SSW0RD",
  "method": "disable_coin",
  "coin": "DOC"
}

{
  "result": {
    "cancelled_orders": ["e5fc7c81-7574-4d3f-b64a-47227455d62a"],
    "coin": "DOC"
  }
}

{
  "error": "No such coin: DOC"
}

{
  "error": "There're active swaps using DOC",
  "swaps": ["d88d0a0e-f8bd-40ab-8edd-fe20801ef349"]
}

{
  "error": "There're currently matching orders using DOC",
  "orders": {
    "matching": ["d88d0a0e-f8bd-40ab-8edd-fe20801ef349"],
    "cancelled": ["c88d0a0e-f8bd-40ab-8edd-fe20801ef349"]
  }
}