Vessel Finance API
  1. Asset
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
          GET
        • Withdraw
          POST
        • Withdraw History
          GET
        • Deposit History
          GET
        • Claim History
          GET
        • Internal Transfer (Send)
          POST
        • Internal Transfer History
          GET
      • Order
        • Place Order
        • Cancel Order
        • Open Orders
        • Completed Orders
        • All Orders
        • Query Order
        • Modify Order
      • 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. Asset

Internal Transfer (Send)

Testnet Env
https://testnet.trade.vessel.finance
Testnet Env
https://testnet.trade.vessel.finance
POST
/api/v1/transfer
Last modified:2024-11-05 05:48:37
The Send API endpoint is used to initiate a transfer of assets from one account to another. The sender and the recipient must be the registered user in Vessel.

Request

Header Params
VESSEL-TIMESTAMP
string 
required
VESSEL-API-KEY
string 
required
Default:
{{API_KEY}}
VESSEL-PASSPHRASE
string 
required
Default:
{{API_PASSPHRASE}}
VESSEL-SIGNATURE
string 
required
Use signRequest script to generate
Body Params application/json
eip712Message
string 
required
Encoded JSON string containing the message details in EIP-712 format, which includes:
account: Sender's account address.
domain: Contains metadata such as chainId and application name(Vessel) for the signing context.
message: Message details with the following:
action: Specifies the operation as "Send".
fromAddress: Address of the sender.
toAddress: Address of the recipient.
assetID: ID of the asset being transferred.
sendAmount: Amount to send.
feeAmount: Associated fee (if any). Currently, the fee is 0.
nonce: A unique number ensuring the request is not repeated.
timestamp: The timestamp of the transfer request.
primaryType and types: Metadata for the EIP-712 standard.
eip712Signature
string 
required
Signature of the eip712Message in EIP-712 format. Confirm that all addresses, especially those under fields like "account", "fromAddress", and "toAddress", are in lowercase. EIP-712 requires address consistency, and using lowercase avoids discrepancies.
signature
string 
required
Cryptographic signature generated using the Poseidon algorithm. Refer to the Poseidon Signature Guide for details on generating the signature.
Example
{
  "eip712Message": "{\"account\":\"0xdB456C895F91C8A098b22EB0AAe1BA7d85c5AE96\",\"domain\":{\"chainId\":31337,\"name\":\"Vessel\"},\"message\":{\"action\":\"Send\",\"fromAddress\":\"0xdB456C895F91C8A098b22EB0AAe1BA7d85c5AE96\",\"toAddress\":\"0xBA2B367127D42f1cC397897B12346911925E5566\",\"assetID\":\"1\",\"sendAmount\":\"0.345\",\"feeAmount\":\"0.0\",\"nonce\":\"1730783550464\",\"timestamp\":\"1730783550464\"},\"primaryType\":\"Vessel\",\"types\":{\"EIP712Domain\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"chainId\",\"type\":\"uint256\"}],\"Vessel\":[{\"name\":\"action\",\"type\":\"string\"},{\"name\":\"fromAddress\",\"type\":\"address\"},{\"name\":\"toAddress\",\"type\":\"address\"},{\"name\":\"assetID\",\"type\":\"string\"},{\"name\":\"sendAmount\",\"type\":\"string\"},{\"name\":\"feeAmount\",\"type\":\"string\"},{\"name\":\"nonce\",\"type\":\"string\"},{\"name\":\"timestamp\",\"type\":\"string\"}]}}",
  "signature": "0x2202b0a6d7ccbec725dfdb2e10c2889e7806e5c4de901f278e8adcce1d8299144f558e09a948c3f6dcf54103a415cfa14c90d62e92425ad44609561e8a0f1fa7",
  "eip712Signature": "0xe2e634eb0918e059dd9ae5b9a9b0220da7d7077ee78c75241bc6cc3fd4e6c454407aa1e386a2d83152364cfcda440656d989729b681b1c3f9a93259b4cd6bad21c"
}

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/transfer' \
--header 'VESSEL-TIMESTAMP;' \
--header 'VESSEL-TIMESTAMP;' \
--header 'VESSEL-API-KEY;' \
--header 'VESSEL-PASSPHRASE;' \
--header 'VESSEL-SIGNATURE;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "eip712Message": "{\"account\":\"0xdB456C895F91C8A098b22EB0AAe1BA7d85c5AE96\",\"domain\":{\"chainId\":31337,\"name\":\"Vessel\"},\"message\":{\"action\":\"Send\",\"fromAddress\":\"0xdB456C895F91C8A098b22EB0AAe1BA7d85c5AE96\",\"toAddress\":\"0xBA2B367127D42f1cC397897B12346911925E5566\",\"assetID\":\"1\",\"sendAmount\":\"0.345\",\"feeAmount\":\"0.0\",\"nonce\":\"1730783550464\",\"timestamp\":\"1730783550464\"},\"primaryType\":\"Vessel\",\"types\":{\"EIP712Domain\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"chainId\",\"type\":\"uint256\"}],\"Vessel\":[{\"name\":\"action\",\"type\":\"string\"},{\"name\":\"fromAddress\",\"type\":\"address\"},{\"name\":\"toAddress\",\"type\":\"address\"},{\"name\":\"assetID\",\"type\":\"string\"},{\"name\":\"sendAmount\",\"type\":\"string\"},{\"name\":\"feeAmount\",\"type\":\"string\"},{\"name\":\"nonce\",\"type\":\"string\"},{\"name\":\"timestamp\",\"type\":\"string\"}]}}",
    "signature": "0x2202b0a6d7ccbec725dfdb2e10c2889e7806e5c4de901f278e8adcce1d8299144f558e09a948c3f6dcf54103a415cfa14c90d62e92425ad44609561e8a0f1fa7",
    "eip712Signature": "0xe2e634eb0918e059dd9ae5b9a9b0220da7d7077ee78c75241bc6cc3fd4e6c454407aa1e386a2d83152364cfcda440656d989729b681b1c3f9a93259b4cd6bad21c"
}'

Responses

🟢200Success
application/json
Body
message
string 
required
The message of response result. "success" confirms that the request was processed successfully.
Example
{
  "message": "success"
}
Previous
Claim History
Next
Internal Transfer History
Built with