vMarket
  • Welcome
  • Developers
    • API Reference
  • How It Works
    • vCall: Overview
    • Transaction Minimums
    • MEV Protection
    • Surplus Handling
    • Fees
    • Refunds
Powered by GitBook
On this page
  1. Developers

API Reference

PreviousWelcomeNextvCall: Overview

Last updated 2 days ago

Page cover image

Get an order by its ID

get

Retrieves an order by its unique identifier.

Path parameters
idstringRequired

Order ID

Responses
200
Returns order details
application/json
get
GET /v1/order/{id} HTTP/1.1
Host: 
Accept: */*
200

Returns order details

{
  "estimatedFillTime": null,
  "fillTime": null,
  "from": "text",
  "id": "text",
  "inputAmount": "text",
  "inputToken": {
    "address": "text",
    "decimals": 1,
    "id": "text",
    "imageUrl": null,
    "isPossibleSpam": true,
    "name": null,
    "network": "mainnet",
    "palette": [
      "text"
    ],
    "peggedTo": null,
    "permitScheme": "permit2",
    "priceUsd": null,
    "symbol": "text",
    "tokenProgram": null
  },
  "inputTx": null,
  "outputToken": {
    "address": "text",
    "decimals": 1,
    "id": "text",
    "imageUrl": null,
    "isPossibleSpam": true,
    "name": null,
    "network": "mainnet",
    "palette": [
      "text"
    ],
    "peggedTo": null,
    "permitScheme": "permit2",
    "priceUsd": null,
    "symbol": "text",
    "tokenProgram": null
  },
  "points": null,
  "receivedAmount": null,
  "receivedToken": null,
  "receivedTx": null,
  "recipient": "text",
  "status": "filling",
  "time": 1
}
  • POSTGet a quote for token swaps
  • POSTExecute a gasless swap.
  • GETGet an order by its ID

Get a quote for token swaps

post

Provides pricing and execution information for a potential swap without actually executing it. This endpoint calculates the expected output amount, fees, and price impact.

Authorization

Requires a valid API key in the x-api-key header.

Body

Request to quote a swap.

amountstringRequired

Amount of the input token

fromstringRequired

Address of the sender

inputNetworkstring · enumRequired

Network of the input token

Possible values:
inputTokenstringRequired

Address of the input token

messageSendAccountstring | nullOptional

(For Solana) For cross-chain swaps with a Solana origin. Pubkey of the message send account for CCTP event storage. This should be a keypair dedicated for this trade. 30 minutes after trade completes, you can close the account to reclaim SOL.

outputNetworkstring · enumRequired

Network of the output token

Possible values:
outputTokenstringRequired

Address of the output token

recipientstringRequired

Address of the recipient

referrerstring | nullOptional

Address of the referrer

referrerCommissionBpsinteger | nullOptional

Commission in basis points

repayGasboolean | nullOptional

Whether the gas burned from on the swap should be repaid to from wallet. Must be null if sponsored is true.

slippageToleranceBpsinteger | nullOptional

Slippage tolerance in basis points

sponsoredboolean | nullOptional

Whether the swap should be gas-free

Responses
200
Returns quote for a swap
application/json
post
POST /v1/quote HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 274

{
  "amount": "text",
  "from": "text",
  "inputNetwork": "mainnet",
  "inputToken": "text",
  "messageSendAccount": null,
  "outputNetwork": "mainnet",
  "outputToken": "text",
  "recipient": "text",
  "referrer": null,
  "referrerCommissionBps": null,
  "repayGas": null,
  "slippageToleranceBps": null,
  "sponsored": null
}
200

Returns quote for a swap

{
  "error": null,
  "permit": null,
  "summary": null,
  "swap": null
}

Execute a gasless swap.

post

Broadcasts a signed gasless order to the network.

Body

POST body to submit an order

orderstringRequired

Order to submit

permitstring | nullOptional

Fullsig from EIP-712 permit message

swapstringRequired

Fullsig from EIP-712 swap message

Responses
200
Broadcasts a gasless swap
application/json
post
POST /v1/submit HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 44

{
  "order": "text",
  "permit": null,
  "swap": "text"
}
200

Broadcasts a gasless swap

{
  "error": null,
  "txHash": null
}