Withdraw balance

Endpoint to withdraw your balance/credits in USDC to an Ethereum wallet

Withdraw USDC from the main balance or for a sub user

POST https://api.venly.market/orders

Request Body

NameTypeDescription

address*

string

Blockchain address which will receive the USDC

type*

string

WITHDRAWAL

amount*

integer

Amount of USDC to withdraw

userId

String

userId of the sub-user. When not provided the withdraw will take place on the main balance

chain

String

The chain to which the withdrawal needs to happen. Values can be: AVAC, ETHEREUM, MATIC, HEDERA (default: ETHEREUM)

{
    "success": true,
    "result": {
        "id": "8d0d817c-3011-43ed-8feb-4cec99e6cd2c",
        "userId": "4917b6fa-2657-4bdd-b8e8-fa5dd8bd4057",
        "paymentProviderOrderId": "edb95c76-30e9-4f98-823b-e829cc073ea5",
        "paymentProcessor": "USDC",
        "quantity": 7.76,
        "handlingFee": 0,
        "marketFee": 5,
        "currency": "USDC",
        "status": "PENDING",
        "date": "2021-06-30T13:39:27.953792Z",
        "type": "WITHDRAWAL"
    }
}

Example

Request

POST https://api.venly.market/orders

Request Body

{
  "address": "0x8D6331D6C5ba3306961F0b4Ea13ff13aa43560b9",
  "amount": 10,
  "userId": "0937da0a-1158-4de7-bcba-94009bfcc1b8",
  "chain": "MATIC",
  "type": "WITHDRAWAL"
}

Response

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

Last updated