Update Instrument Spread
curl --request PUT \
--url https://mapi.zbx.boomfi.xyz/v1/trade/instrument/{id}/spread \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"spread_bps": 1
}
'import requests
url = "https://mapi.zbx.boomfi.xyz/v1/trade/instrument/{id}/spread"
payload = { "spread_bps": 1 }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({spread_bps: 1})
};
fetch('https://mapi.zbx.boomfi.xyz/v1/trade/instrument/{id}/spread', 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://mapi.zbx.boomfi.xyz/v1/trade/instrument/{id}/spread",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'spread_bps' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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://mapi.zbx.boomfi.xyz/v1/trade/instrument/{id}/spread"
payload := strings.NewReader("{\n \"spread_bps\": 1\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.put("https://mapi.zbx.boomfi.xyz/v1/trade/instrument/{id}/spread")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"spread_bps\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mapi.zbx.boomfi.xyz/v1/trade/instrument/{id}/spread")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"spread_bps\": 1\n}"
response = http.request(request)
puts response.read_body{
"data": {
"base": "<string>",
"base_chain": 123,
"estimated_cost_bps": 123,
"estimated_delay_ms": 123,
"id": 123,
"last_price": 123,
"last_price_at": "<string>",
"last_reverse_price": 123,
"max_size": 123,
"min_size": 123,
"properties": [
123
],
"quote": "<string>",
"quote_chain": 123,
"spread_bps": 123,
"venue_id": 123
},
"error": true,
"message": "<string>"
}{
"error": {
"code": 400,
"errors": [
{
"domain": "orders",
"reason": "InsufficientQuantity"
}
],
"message": "Insufficient quantity"
}
}{
"error": {
"code": 400,
"errors": [
{
"domain": "orders",
"reason": "InsufficientQuantity"
}
],
"message": "Insufficient quantity"
}
}{
"error": {
"code": 400,
"errors": [
{
"domain": "orders",
"reason": "InsufficientQuantity"
}
],
"message": "Insufficient quantity"
}
}{
"error": {
"code": 400,
"errors": [
{
"domain": "orders",
"reason": "InsufficientQuantity"
}
],
"message": "Insufficient quantity"
}
}Instruments
Update Instrument Spread
Updates the spread (in basis points) for a trade venue instrument. Only accessible by the OTC org.
PUT
/
trade
/
instrument
/
{id}
/
spread
Update Instrument Spread
curl --request PUT \
--url https://mapi.zbx.boomfi.xyz/v1/trade/instrument/{id}/spread \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"spread_bps": 1
}
'import requests
url = "https://mapi.zbx.boomfi.xyz/v1/trade/instrument/{id}/spread"
payload = { "spread_bps": 1 }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({spread_bps: 1})
};
fetch('https://mapi.zbx.boomfi.xyz/v1/trade/instrument/{id}/spread', 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://mapi.zbx.boomfi.xyz/v1/trade/instrument/{id}/spread",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'spread_bps' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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://mapi.zbx.boomfi.xyz/v1/trade/instrument/{id}/spread"
payload := strings.NewReader("{\n \"spread_bps\": 1\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.put("https://mapi.zbx.boomfi.xyz/v1/trade/instrument/{id}/spread")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"spread_bps\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mapi.zbx.boomfi.xyz/v1/trade/instrument/{id}/spread")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"spread_bps\": 1\n}"
response = http.request(request)
puts response.read_body{
"data": {
"base": "<string>",
"base_chain": 123,
"estimated_cost_bps": 123,
"estimated_delay_ms": 123,
"id": 123,
"last_price": 123,
"last_price_at": "<string>",
"last_reverse_price": 123,
"max_size": 123,
"min_size": 123,
"properties": [
123
],
"quote": "<string>",
"quote_chain": 123,
"spread_bps": 123,
"venue_id": 123
},
"error": true,
"message": "<string>"
}{
"error": {
"code": 400,
"errors": [
{
"domain": "orders",
"reason": "InsufficientQuantity"
}
],
"message": "Insufficient quantity"
}
}{
"error": {
"code": 400,
"errors": [
{
"domain": "orders",
"reason": "InsufficientQuantity"
}
],
"message": "Insufficient quantity"
}
}{
"error": {
"code": 400,
"errors": [
{
"domain": "orders",
"reason": "InsufficientQuantity"
}
],
"message": "Insufficient quantity"
}
}{
"error": {
"code": 400,
"errors": [
{
"domain": "orders",
"reason": "InsufficientQuantity"
}
],
"message": "Insufficient quantity"
}
}Authorizations
Path Parameters
Unique trade venue instrument identifier
Body
application/json
Spread update request
Spread applied to this instrument in basis points.
Required range:
x >= 0⌘I