Withdraw balance

How to withdraw your balance/credits in USDC to your wallet.

Request Endpoint: reference

POST /orders
ParameterParam TypeDescriptionData TypeMandatory
addressBodyWallet address which will receive the USDCStringโœ…
typeBodyThe type will be WITHDRAWALStringโœ…
amountBodyAmount of USDC to withdrawIntegerโœ…
userIdBodyuserId of the sub-user. When not provided the withdrawal will take place on the main balanceStringโŒ
chainBodyThe chain to which the withdrawal needs to happen. Values can be: AVAC, ETHEREUM, MATIC, HEDERA (default: ETHEREUM)StringโŒ

Example Request:

POST https://api.venly.market/orders
{
  "address": "0x8D6331D6C5ba3306961F0b4Ea13ff13aa43560b9",
  "amount": 10,
  "userId": "0937da0a-1158-4de7-bcba-94009bfcc1b8",
  "chain": "MATIC",
  "type": "WITHDRAWAL"
}

Response Body:

{
  "success": true,
  "result": {
    "id": "e70fcc4e-e2d5-41ee-ad1d-e10a716b9417",
    "userId": "0937da0a-1158-4de7-bcba-94009bfcc1b8",
    "quantity": 5,
    "marketFee": 5,
    "status": "APPROVED",
    "date": "2022-11-23T12:57:27.673672Z",
    "type": "WITHDRAWAL",
    "transaction": {
      "blockchain": "MATIC",
      "destination": "0x8D6331D6C5ba3306961F0b4Ea13ff13aa43560b9"
    }
  }
}