curl --request POST \
--url https://api.marks.finance/api/v2/partners/hedges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"market": "USDTNGN",
"side": "sell",
"notional_usd": 100000,
"tenor_days": 7,
"client_reference": "deal-4821"
}
'import requests
url = "https://api.marks.finance/api/v2/partners/hedges"
payload = {
"market": "USDTNGN",
"side": "sell",
"notional_usd": 100000,
"tenor_days": 7,
"client_reference": "deal-4821"
}
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',
notional_usd: 100000,
tenor_days: 7,
client_reference: 'deal-4821'
})
};
fetch('https://api.marks.finance/api/v2/partners/hedges', 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",
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',
'notional_usd' => 100000,
'tenor_days' => 7,
'client_reference' => 'deal-4821'
]),
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"
payload := strings.NewReader("{\n \"market\": \"USDTNGN\",\n \"side\": \"sell\",\n \"notional_usd\": 100000,\n \"tenor_days\": 7,\n \"client_reference\": \"deal-4821\"\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"market\": \"USDTNGN\",\n \"side\": \"sell\",\n \"notional_usd\": 100000,\n \"tenor_days\": 7,\n \"client_reference\": \"deal-4821\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.marks.finance/api/v2/partners/hedges")
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 \"notional_usd\": 100000,\n \"tenor_days\": 7,\n \"client_reference\": \"deal-4821\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"status": "submitted",
"order_tx_hash": "0x9c1e4f2a7b8d3e6c5a0f1b2d4e6a8c0f2b4d6e8a1c3f5b7d9e0a2c4f6b8d0e2a",
"hedge_id": "hdg_3f9a2c7e5b1d",
"client_reference": "deal-4821",
"collateral_usdc": 5080,
"maturity_at": "2026-08-15T00:00:00Z",
"quote": {
"market": "USDTNGN",
"side": "sell",
"notional_usd": 100000,
"tenor_days": 7,
"maturity": "2026-08-15T00:00:00Z",
"pricing": {
"market_price": 1620.5,
"execution_price": 1619.8,
"price_impact_usd": -43.2
},
"carry": {
"daily_usdc": 50,
"daily_rate_pct": 0.05,
"total_usdc": 350,
"total_rate_pct": 0.35
},
"upfront": {
"required_margin_usdc": 5000,
"platform_fee_usdc": 80,
"total_upfront_usdc": 5080
}
}
},
"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": {}
}Open a Hedge
Opens a hedge for the given market, side, size, and tenor. Returns immediately with status submitted, an order_tx_hash, and a hedge_id; it’s filled shortly after, so poll GET /hedges/{id} for the fill. Pass a unique Idempotency-Key to make retries safe, and (for API keys) a client_reference to tag the hedge with your own id.
Restriction: one open hedge per market + side per account. If you already have an open hedge on that market and side, this returns 409 hedge_exists - use POST /hedges/{id}/add to increase it (keeps the original maturity), or settle it first. A different maturity on the same market+side requires settling the current hedge first.
curl --request POST \
--url https://api.marks.finance/api/v2/partners/hedges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"market": "USDTNGN",
"side": "sell",
"notional_usd": 100000,
"tenor_days": 7,
"client_reference": "deal-4821"
}
'import requests
url = "https://api.marks.finance/api/v2/partners/hedges"
payload = {
"market": "USDTNGN",
"side": "sell",
"notional_usd": 100000,
"tenor_days": 7,
"client_reference": "deal-4821"
}
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',
notional_usd: 100000,
tenor_days: 7,
client_reference: 'deal-4821'
})
};
fetch('https://api.marks.finance/api/v2/partners/hedges', 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",
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',
'notional_usd' => 100000,
'tenor_days' => 7,
'client_reference' => 'deal-4821'
]),
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"
payload := strings.NewReader("{\n \"market\": \"USDTNGN\",\n \"side\": \"sell\",\n \"notional_usd\": 100000,\n \"tenor_days\": 7,\n \"client_reference\": \"deal-4821\"\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"market\": \"USDTNGN\",\n \"side\": \"sell\",\n \"notional_usd\": 100000,\n \"tenor_days\": 7,\n \"client_reference\": \"deal-4821\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.marks.finance/api/v2/partners/hedges")
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 \"notional_usd\": 100000,\n \"tenor_days\": 7,\n \"client_reference\": \"deal-4821\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"status": "submitted",
"order_tx_hash": "0x9c1e4f2a7b8d3e6c5a0f1b2d4e6a8c0f2b4d6e8a1c3f5b7d9e0a2c4f6b8d0e2a",
"hedge_id": "hdg_3f9a2c7e5b1d",
"client_reference": "deal-4821",
"collateral_usdc": 5080,
"maturity_at": "2026-08-15T00:00:00Z",
"quote": {
"market": "USDTNGN",
"side": "sell",
"notional_usd": 100000,
"tenor_days": 7,
"maturity": "2026-08-15T00:00:00Z",
"pricing": {
"market_price": 1620.5,
"execution_price": 1619.8,
"price_impact_usd": -43.2
},
"carry": {
"daily_usdc": 50,
"daily_rate_pct": 0.05,
"total_usdc": 350,
"total_rate_pct": 0.35
},
"upfront": {
"required_margin_usdc": 5000,
"platform_fee_usdc": 80,
"total_upfront_usdc": 5080
}
}
},
"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": {}
}Authorizations
Partner API key: mk_live_... (production) or mk_test_... (sandbox).
Body
e.g. USDTNGN
buy | sell
Settlement tenor in days. Allowed: 1, 3, or 7.
1, 3, 7 Your own deal id, echoed back on reads. Required for API-key (server) callers.

