Reduce a Hedge
curl --request POST \
--url https://api.marks.finance/api/v2/partners/hedges/decrease \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"market": "USDTNGN",
"side": "sell",
"reduce_notional_usd": 50000
}
'import requests
url = "https://api.marks.finance/api/v2/partners/hedges/decrease"
payload = {
"market": "USDTNGN",
"side": "sell",
"reduce_notional_usd": 50000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({market: 'USDTNGN', side: 'sell', reduce_notional_usd: 50000})
};
fetch('https://api.marks.finance/api/v2/partners/hedges/decrease', 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.marks.finance/api/v2/partners/hedges/decrease",
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([
'market' => 'USDTNGN',
'side' => 'sell',
'reduce_notional_usd' => 50000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.marks.finance/api/v2/partners/hedges/decrease"
payload := strings.NewReader("{\n \"market\": \"USDTNGN\",\n \"side\": \"sell\",\n \"reduce_notional_usd\": 50000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.marks.finance/api/v2/partners/hedges/decrease")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"market\": \"USDTNGN\",\n \"side\": \"sell\",\n \"reduce_notional_usd\": 50000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.marks.finance/api/v2/partners/hedges/decrease")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"market\": \"USDTNGN\",\n \"side\": \"sell\",\n \"reduce_notional_usd\": 50000\n}"
response = http.request(request)
puts response.read_body{
"data": {
"status": "submitted",
"order_tx_hash": "0x9c1e4f2a7b8d3e6c5a0f1b2d4e6a8c0f2b4d6e8a1c3f5b7d9e0a2c4f6b8d0e2a",
"hedge_id": "hdg_3f9a2c7e5b1d",
"market": "USDTNGN",
"side": "sell",
"reduced_notional_usd": 50000,
"new_notional_usd": 50000,
"maturity_at": "2026-08-15T00:00:00Z"
},
"error": null,
"meta": {}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {}
}Hedges
Reduce a Hedge
Partially reduce your open hedge on a market and side by removing notional, keeping the same maturity - the mirror of /hedges/add. The reduction is proportional, so the margin backing the position scales down with it; if the reduction covers roughly the whole position, it closes fully. Returns submitted with an order_tx_hash; the reduction fills shortly after. Returns 404 no_open_hedge if you have no open hedge on that side. Pass an Idempotency-Key to make retries safe.
POST
/
hedges
/
decrease
Reduce a Hedge
curl --request POST \
--url https://api.marks.finance/api/v2/partners/hedges/decrease \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"market": "USDTNGN",
"side": "sell",
"reduce_notional_usd": 50000
}
'import requests
url = "https://api.marks.finance/api/v2/partners/hedges/decrease"
payload = {
"market": "USDTNGN",
"side": "sell",
"reduce_notional_usd": 50000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({market: 'USDTNGN', side: 'sell', reduce_notional_usd: 50000})
};
fetch('https://api.marks.finance/api/v2/partners/hedges/decrease', 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.marks.finance/api/v2/partners/hedges/decrease",
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([
'market' => 'USDTNGN',
'side' => 'sell',
'reduce_notional_usd' => 50000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.marks.finance/api/v2/partners/hedges/decrease"
payload := strings.NewReader("{\n \"market\": \"USDTNGN\",\n \"side\": \"sell\",\n \"reduce_notional_usd\": 50000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.marks.finance/api/v2/partners/hedges/decrease")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"market\": \"USDTNGN\",\n \"side\": \"sell\",\n \"reduce_notional_usd\": 50000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.marks.finance/api/v2/partners/hedges/decrease")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"market\": \"USDTNGN\",\n \"side\": \"sell\",\n \"reduce_notional_usd\": 50000\n}"
response = http.request(request)
puts response.read_body{
"data": {
"status": "submitted",
"order_tx_hash": "0x9c1e4f2a7b8d3e6c5a0f1b2d4e6a8c0f2b4d6e8a1c3f5b7d9e0a2c4f6b8d0e2a",
"hedge_id": "hdg_3f9a2c7e5b1d",
"market": "USDTNGN",
"side": "sell",
"reduced_notional_usd": 50000,
"new_notional_usd": 50000,
"maturity_at": "2026-08-15T00:00:00Z"
},
"error": null,
"meta": {}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {}
}Authorizations
Partner API key: mk_live_... (production) or mk_test_... (sandbox).
Body
application/json
⌘I

