Vessel Finance API
  1. Order
Vessel Finance API
  • Introduction
  • General Info
  • HMAC Signature Guide
  • Poseidon Signature Guide
  • Internal Transfer Signature Guide
  • Error Code
  • Vessel REST API
    • Public
      • Market Data
        • 24hr Ticker Statistics
        • Kline / Candlestick Data
        • Order Book
        • Recent Trades List
        • Average Price
        • AMM Pool Last 24h Data
      • Exchange Data
        • Ticker Info
        • Asset Info
        • Trade Fee
        • AMM Pool Info
    • User
      • Asset
        • User Asset
        • Withdraw
        • Withdraw History
        • Deposit History
        • Claim History
        • Internal Transfer (Send)
        • Internal Transfer History
      • Order
        • Place Order
          POST
        • Cancel Order
          DELETE
        • Open Orders
          GET
        • Completed Orders
          GET
        • All Orders
          GET
        • Query Order
          GET
        • Modify Order
          POST
      • AMM
        • Add Liquidity
        • Remove Liquidity
        • Collect Fee
        • AMM Position
        • AMM Action History
      • Account
        • User Profile
        • User Trade List
  • Vessel WebSocket
    • Market
      • Order Book
      • K Line
      • Recent Trades
      • 24hr Ticker Statistics
      • Ticker Setting Upade
    • User
      • Authorize
      • Balance
      • Account
  1. Order

Modify Order

Testnet Env
https://testnet.trade.vessel.finance
Testnet Env
https://testnet.trade.vessel.finance
POST
/api/v1/modifyOrder
Last modified:2024-10-15 06:23:56
Modify Order allows users to modify a specific order on our platform. To utilize this API, follow the Poseidon Signature Guide to generate the necessary body parameters and timestamp for the header. Input the generated values and proceed to test our Modify Order API.

Request

Header Params
VESSEL-API-KEY
string 
required
Default:
{{API_KEY}}
VESSEL-PASSPHRASE
string 
required
Default:
{{API_PASSPHRASE}}
VESSEL-SIGNATURE
string 
required
Use signRequest script to generate
VESSEL-TIMESTAMP
string 
required
Use signRequest script to set
Body Params application/json
symbol
string 
required
Trading pair symbol (e.g., "WBTCUSDT") for which the order is placed.
oldOrderId
string 
required
The unique identifier assigned by the client for the old order that need to be modified.
quantity
string 
required
New quantity for this modification.
price
string 
required
New price for this modification.
newClientOrderId
string 
required
The unique identifier assigned by the client to new order. It must be unique for each new order.
signature
string 
required
The cryptographic signature generated using the Poseidon algorithm. Refer to the Poseidon Signature Guide for details on generating the signature.
newOrderRespType
string 
required
Specifies the response type for the new order.
"FULL" will respond with detailed information about the new order, including all relevant details.
"RESULT" will respond with only the basic result of the order placement.
"ACK" will respond with a quick acknowledgment that the order has been received and is being processed. However, the response will not include the detailed information about the order's status or execution.
Example
{
  "symbol": "WBTCUSDT",
  "oldOrderId": "78",
  "quantity": "0.12",
  "price": "36000",
  "newClientOrderId": "1701772026638",
  "signature": "0xd448022ed479ff946790d172ad21b4e42ad3647ac0c2a73151ffa45242bc9a093462368dafd45725d75f530c519201110f87a074167a5eb7c773d3fa99d3f66c",
  "newOrderRespType": "FULL"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://testnet.trade.vessel.finance/api/v1/modifyOrder' \
--header 'VESSEL-API-KEY;' \
--header 'VESSEL-PASSPHRASE;' \
--header 'VESSEL-SIGNATURE;' \
--header 'VESSEL-TIMESTAMP;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "symbol": "WBTCUSDT",
    "oldOrderId": "78",
    "quantity": "0.12",
    "price": "36000",
    "newClientOrderId": "1701772026638",
    "signature": "0xd448022ed479ff946790d172ad21b4e42ad3647ac0c2a73151ffa45242bc9a093462368dafd45725d75f530c519201110f87a074167a5eb7c773d3fa99d3f66c",
    "newOrderRespType": "FULL"
}'

Responses

🟢200Success
application/json
Body
orderId
string 
required
Unique identifier assigned to the newly placed order.
symbol
string 
required
Trading pair symbol for which the order was placed (e.g., "WBTCUSDT").
transactTime
string 
required
Timestamp when the order transaction occurred (Unix timestamps in milliseconds & UTC).
workingTime
string 
required
Timestamp when the order started processing (Unix timestamps in milliseconds & UTC).
origQty
string 
required
Original quantity specified in the order.
type
string 
required
Type of order (e.g., "LIMIT").
side
string 
required
Side of the order (e.g., "BUY" or "SELL").
executedQty
string 
required
Quantity of the order that has been executed.
status
string 
required
The current status of the order.
NEW: The order has been created and is awaiting processing.
PARTIALLY_FILLED: The order has been partially filled.
FILLED: The order has been completely filled.
CANCELED: The order has been canceled.
REJECTED: The order has been rejected.
EXPIRED: The order has expired.
fills
array [object {3}] 
required
Details of the fills that occurred during the order execution.
action
string 
required
Action associated with the fill, indicating the nature of the transaction (e.g., "TRADE", "REJECT", "REDUCE").
price
string 
required
Price at which the fill occurred.
qty
string 
required
Quantity of the asset filled in the transaction.
price
string 
optional
Price specified in the order.
timeInForce
string 
optional
Time in force for the order. "GTC" for Good Til Canceled, "FOK" for Fill Or Kill, and "IOC" Immediate Or Cancel.
Example
{
  "orderId": "3907830740629590000",
  "symbol": "BTCUSDT",
  "transactTime": "1692865580026",
  "workingTime": "1692865580029",
  "origQty": "0.001",
  "type": "MARKET",
  "side": "SELL",
  "executedQty": "0.0001",
  "status": "PARTIALLY_FILLED",
  "fills": [
    {
      "action": "REJECT",
      "price": "0",
      "qty": "0.0009"
    },
    {
      "action": "TRADE",
      "price": "1000",
      "qty": "0.0001"
    }
  ]
}
Previous
Query Order
Next
Add Liquidity
Built with