Undelegate (unlock) funds
Undelegate funds from a ClearLoop exchange using the Copper user interface or API.
When funds are undelegated, they are withdrawn from the exchange and released back into the Copper Trading Account. Two orders are created as a result:
- Deposit order in the Trading portfolio, containing isClearLoopUnDelegation under order extra.
- Withdrawal order in the ClearLoop portfolio.
Both orders are linked under order extra by withdrawOrderId and depositOrderId.
Note that the terms “account” and “transaction” in the user interface correspond to the terms “portfolio” and “order” in the API and codebase.
To undelegate funds from a ClearLoop exchange, create an order with the following parameters:
Body
The amount of order in baseCurrency
"0.1"
The currency of the order amount
"BTC"
Unique order identifier from client (should be unique for the portfolio)
The order type. See details
withdraw
The id of the portfolio where the order should be placed
In case of a withdrawal on a different portfolio, the portfolio id of the destination account
The description of the order
"Withdrawal to my wallet"
The main currency of the base currency
Response
Amount of order in baseCurrency
Base currency of the order
Order creation timestamp
The order ID in the external system
Order ID
Order type. See details
sell
, buy
, deposit
, withdraw
, multi-withdraw
, wallet-message
, retrieved-deposit
, earn-reward
, earn-shared-reward
, claim-shared-reward
, cross-chain-deposit
, cross-chain-withdraw
Portfolio ID
Portfolio type. See details
custody
, trading-vault
, trading
, external
, clearloop
Order status. See details
new
, waiting-funds
, reserved
, working
, waiting-approve
, co-sign-require
, approved
, processing
, executed
, canceled
, rejecting
, rejected
, declining
, declined
, blocked
, action-required
, require-initializer-approve
, waiting-counterparty-approve
, require-counterparty-approve
, ready-for-settlement
, settled
, part-signed-tx-added
, full-signed-tx-added
, rejected-part-signed-tx-added
, rejected-full-signed-tx-added
, awaiting-settlement
, master-password-required
, manual-resolving
, error
, pending-atomic-settlement-confirmation
, atomic-settlement-reservation-completed
Creator user id
Additional order information
Limit type of the order. See details
otc
, rfq
Blockchain network of a baseCurrency
Organization id
The quote currency of the order (in case of a settle order)
Blockchain network of a quoteCurrency
Order termination timestamp
Order update timestamp