These docs are for v2.0. Click to read the latest docs for v3.0.

Withdraw balance

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

🚧

The Market API will be discontinued, in Q3 2024 we will be sunsetting this product

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"
    }
  }
}