curl --request POST \
--url https://api.velora.xyz/v2/delta/orders \
--header 'Content-Type: application/json' \
--data '
{
"chainId": 123,
"order": {},
"signature": "<string>",
"partner": "my-app-name",
"type": "MARKET",
"referrerAddress": "<string>",
"partiallyFillable": false,
"includeAgents": [
"<string>"
],
"excludeAgents": [
"<string>"
]
}
'import requests
url = "https://api.velora.xyz/v2/delta/orders"
payload = {
"chainId": 123,
"order": {},
"signature": "<string>",
"partner": "my-app-name",
"type": "MARKET",
"referrerAddress": "<string>",
"partiallyFillable": False,
"includeAgents": ["<string>"],
"excludeAgents": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
chainId: 123,
order: {},
signature: '<string>',
partner: 'my-app-name',
type: 'MARKET',
referrerAddress: '<string>',
partiallyFillable: false,
includeAgents: ['<string>'],
excludeAgents: ['<string>']
})
};
fetch('https://api.velora.xyz/v2/delta/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.velora.xyz/v2/delta/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'chainId' => 123,
'order' => [
],
'signature' => '<string>',
'partner' => 'my-app-name',
'type' => 'MARKET',
'referrerAddress' => '<string>',
'partiallyFillable' => false,
'includeAgents' => [
'<string>'
],
'excludeAgents' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.velora.xyz/v2/delta/orders"
payload := strings.NewReader("{\n \"chainId\": 123,\n \"order\": {},\n \"signature\": \"<string>\",\n \"partner\": \"my-app-name\",\n \"type\": \"MARKET\",\n \"referrerAddress\": \"<string>\",\n \"partiallyFillable\": false,\n \"includeAgents\": [\n \"<string>\"\n ],\n \"excludeAgents\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.velora.xyz/v2/delta/orders")
.header("Content-Type", "application/json")
.body("{\n \"chainId\": 123,\n \"order\": {},\n \"signature\": \"<string>\",\n \"partner\": \"my-app-name\",\n \"type\": \"MARKET\",\n \"referrerAddress\": \"<string>\",\n \"partiallyFillable\": false,\n \"includeAgents\": [\n \"<string>\"\n ],\n \"excludeAgents\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.velora.xyz/v2/delta/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"chainId\": 123,\n \"order\": {},\n \"signature\": \"<string>\",\n \"partner\": \"my-app-name\",\n \"type\": \"MARKET\",\n \"referrerAddress\": \"<string>\",\n \"partiallyFillable\": false,\n \"includeAgents\": [\n \"<string>\"\n ],\n \"excludeAgents\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"input": {
"chainId": 123,
"token": "<string>",
"amount": "<string>",
"expectedAmount": "<string>",
"executedAmount": "<string>"
},
"output": {
"chainId": 123,
"token": "<string>",
"amount": "<string>",
"expectedAmount": "<string>",
"executedAmount": "<string>"
},
"owner": "<string>",
"beneficiary": "<string>",
"orderHash": "<string>",
"partner": "<string>",
"order": {},
"transactions": [
{
"originTx": "<string>",
"destinationTx": "<string>",
"filledPercent": 123,
"spentAmount": "<string>",
"receivedAmount": "<string>"
}
],
"refunds": [
{
"tx": "<string>",
"chainId": 123,
"token": "<string>",
"amount": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z"
}Submit a Delta order
Submit a signed Delta V2 order. The relayer validates signature, balance, and allowance, then enrolls it into the sealed-bid auction.
curl --request POST \
--url https://api.velora.xyz/v2/delta/orders \
--header 'Content-Type: application/json' \
--data '
{
"chainId": 123,
"order": {},
"signature": "<string>",
"partner": "my-app-name",
"type": "MARKET",
"referrerAddress": "<string>",
"partiallyFillable": false,
"includeAgents": [
"<string>"
],
"excludeAgents": [
"<string>"
]
}
'import requests
url = "https://api.velora.xyz/v2/delta/orders"
payload = {
"chainId": 123,
"order": {},
"signature": "<string>",
"partner": "my-app-name",
"type": "MARKET",
"referrerAddress": "<string>",
"partiallyFillable": False,
"includeAgents": ["<string>"],
"excludeAgents": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
chainId: 123,
order: {},
signature: '<string>',
partner: 'my-app-name',
type: 'MARKET',
referrerAddress: '<string>',
partiallyFillable: false,
includeAgents: ['<string>'],
excludeAgents: ['<string>']
})
};
fetch('https://api.velora.xyz/v2/delta/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.velora.xyz/v2/delta/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'chainId' => 123,
'order' => [
],
'signature' => '<string>',
'partner' => 'my-app-name',
'type' => 'MARKET',
'referrerAddress' => '<string>',
'partiallyFillable' => false,
'includeAgents' => [
'<string>'
],
'excludeAgents' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.velora.xyz/v2/delta/orders"
payload := strings.NewReader("{\n \"chainId\": 123,\n \"order\": {},\n \"signature\": \"<string>\",\n \"partner\": \"my-app-name\",\n \"type\": \"MARKET\",\n \"referrerAddress\": \"<string>\",\n \"partiallyFillable\": false,\n \"includeAgents\": [\n \"<string>\"\n ],\n \"excludeAgents\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.velora.xyz/v2/delta/orders")
.header("Content-Type", "application/json")
.body("{\n \"chainId\": 123,\n \"order\": {},\n \"signature\": \"<string>\",\n \"partner\": \"my-app-name\",\n \"type\": \"MARKET\",\n \"referrerAddress\": \"<string>\",\n \"partiallyFillable\": false,\n \"includeAgents\": [\n \"<string>\"\n ],\n \"excludeAgents\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.velora.xyz/v2/delta/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"chainId\": 123,\n \"order\": {},\n \"signature\": \"<string>\",\n \"partner\": \"my-app-name\",\n \"type\": \"MARKET\",\n \"referrerAddress\": \"<string>\",\n \"partiallyFillable\": false,\n \"includeAgents\": [\n \"<string>\"\n ],\n \"excludeAgents\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"input": {
"chainId": 123,
"token": "<string>",
"amount": "<string>",
"expectedAmount": "<string>",
"executedAmount": "<string>"
},
"output": {
"chainId": 123,
"token": "<string>",
"amount": "<string>",
"expectedAmount": "<string>",
"executedAmount": "<string>"
},
"owner": "<string>",
"beneficiary": "<string>",
"orderHash": "<string>",
"partner": "<string>",
"order": {},
"transactions": [
{
"originTx": "<string>",
"destinationTx": "<string>",
"filledPercent": 123,
"spentAmount": "<string>",
"receivedAmount": "<string>"
}
],
"refunds": [
{
"tx": "<string>",
"chainId": 123,
"token": "<string>",
"amount": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z"
}Body
The toSign.value returned by POST /v2/delta/orders/build, sent verbatim.
EIP-712 signature over order.
"my-app-name"
MARKET, LIMIT Response
Order accepted.
V2 order shape returned by every order endpoint (reads and posts). input and output carry the expected + executed amounts so you don't need to compute fill-percent yourself. onChainOrderType selects the family the order struct belongs to. Crosschain refunds appear in refunds after Velora verifies the refund transaction receipt.
PENDING, AWAITING_SIGNATURE, ACTIVE, SUSPENDED, CANCELLING, BRIDGING, COMPLETED, FAILED, EXPIRED, REFUNDING, CANCELLED, REFUNDED SELL, BUY MARKET, LIMIT Order, FillableOrder, ProductiveOrder, ExternalOrder, TWAPOrder, TWAPBuyOrder Source-side token movement. SELL: { chainId, token, amount }. BUY: { chainId, token, expectedAmount, executedAmount }.
Show child attributes
Show child attributes
Destination-side token movement. SELL: { chainId, token, expectedAmount, executedAmount }. BUY: { chainId, token, amount }.
Show child attributes
Show child attributes
The signed on-chain Order struct.
Show child attributes
Show child attributes
Verified bridge refund transactions for crosschain orders. Empty until Velora can match an on-chain refund receipt; some bridge providers may not emit source-chain token refund metadata.
Show child attributes
Show child attributes
Was this page helpful?