const res = await fetch('https://app.trdrs.co/api/partner/venues/{venueId}/risk-policies', {
method: 'POST',
headers: {
'content-type': 'application/json',
Authorization: `Bearer ${process.env.TRDRS_VENUE_KEY}`,
"Idempotency-Key": "example-request-1",
},
body: JSON.stringify({
"policy": {
"policyId": "meridian-futures",
"version": "2026-10-01",
"authority": {
"kind": "firm",
"venueId": "00000000-0000-0000-0000-000000000001",
"name": "Meridian Futures"
},
"currency": "USD",
"pools": {
"futures": {
"margin": {
"version": "margin-2026-10-01",
"authority": "firm",
"source": "the venue's own terms",
"effectiveFrom": "2026-10-01T00:00:00.000Z",
"effectiveUntil": null,
"asset": "USD",
"basis": "per_contract",
"window": {
"timeZone": "America/Chicago",
"startMinute": 510,
"exposureCutoffMinute": 900,
"endMinute": 915,
"weekdays": [
1,
2,
3,
4,
5
],
"closedDates": []
},
"closeOnly": "at_roll",
"contracts": [
{
"contract": "CME:NQZ2026",
"root": "NQ",
"day": {
"initial": "1000",
"maintenance": "500",
"sources": {
"initial": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": true
},
"maintenance": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": true
}
}
},
"overnight": {
"initial": "43207",
"maintenance": "43207",
"sources": {
"initial": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": true
},
"maintenance": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": true
}
}
}
}
]
},
"thresholds": {
"version": "thresholds-2026-10-01",
"authority": "firm",
"source": "the venue's own terms",
"effectiveFrom": "2026-10-01T00:00:00.000Z",
"effectiveUntil": null,
"marginCall": null,
"stopOut": "1",
"recoveryLevel": "1.1",
"sources": {
"marginCall": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": true
},
"stopOut": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": true
},
"recoveryLevel": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": true
}
}
},
"valuation": {
"version": "valuation-2026-10-01",
"authority": "firm",
"source": "the venue's own terms",
"effectiveFrom": "2026-10-01T00:00:00.000Z",
"effectiveUntil": null,
"maxAgeMs": 5000
},
"ticketHedging": null
},
"crypto_derivative": null
},
"settlement": {
"version": "settlement-2026-10-01",
"authority": "firm",
"source": "the venue's own terms",
"effectiveFrom": "2026-10-01T00:00:00.000Z",
"effectiveUntil": null,
"kind": "settlement_asset"
},
"posting": {
"version": "posting-2026-10-01",
"authority": "firm",
"source": "the venue's own terms",
"effectiveFrom": "2026-10-01T00:00:00.000Z",
"effectiveUntil": null,
"currencies": [
{
"currency": "USD",
"decimals": 2,
"rounding": "half_even",
"source": {
"authority": "publisher",
"source": "ISO 4217: USD minor unit 2",
"sourced": true,
"document": null
}
}
]
}
}
}),
})
const data = await res.json()curl -X POST 'https://app.trdrs.co/api/partner/venues/{venueId}/risk-policies' \
-H "Authorization: Bearer $TRDRS_VENUE_KEY" \
-H 'Idempotency-Key: example-request-1' \
-H 'content-type: application/json' \
-d '{"policy":{"policyId":"meridian-futures","version":"2026-10-01","authority":{"kind":"firm","venueId":"00000000-0000-0000-0000-000000000001","name":"Meridian Futures"},"currency":"USD","pools":{"futures":{"margin":{"version":"margin-2026-10-01","authority":"firm","source":"the venue's own terms","effectiveFrom":"2026-10-01T00:00:00.000Z","effectiveUntil":null,"asset":"USD","basis":"per_contract","window":{"timeZone":"America/Chicago","startMinute":510,"exposureCutoffMinute":900,"endMinute":915,"weekdays":[1,2,3,4,5],"closedDates":[]},"closeOnly":"at_roll","contracts":[{"contract":"CME:NQZ2026","root":"NQ","day":{"initial":"1000","maintenance":"500","sources":{"initial":{"authority":"firm","source":"the venue's own terms","sourced":true},"maintenance":{"authority":"firm","source":"the venue's own terms","sourced":true}}},"overnight":{"initial":"43207","maintenance":"43207","sources":{"initial":{"authority":"firm","source":"the venue's own terms","sourced":true},"maintenance":{"authority":"firm","source":"the venue's own terms","sourced":true}}}}]},"thresholds":{"version":"thresholds-2026-10-01","authority":"firm","source":"the venue's own terms","effectiveFrom":"2026-10-01T00:00:00.000Z","effectiveUntil":null,"marginCall":null,"stopOut":"1","recoveryLevel":"1.1","sources":{"marginCall":{"authority":"firm","source":"the venue's own terms","sourced":true},"stopOut":{"authority":"firm","source":"the venue's own terms","sourced":true},"recoveryLevel":{"authority":"firm","source":"the venue's own terms","sourced":true}}},"valuation":{"version":"valuation-2026-10-01","authority":"firm","source":"the venue's own terms","effectiveFrom":"2026-10-01T00:00:00.000Z","effectiveUntil":null,"maxAgeMs":5000},"ticketHedging":null},"crypto_derivative":null},"settlement":{"version":"settlement-2026-10-01","authority":"firm","source":"the venue's own terms","effectiveFrom":"2026-10-01T00:00:00.000Z","effectiveUntil":null,"kind":"settlement_asset"},"posting":{"version":"posting-2026-10-01","authority":"firm","source":"the venue's own terms","effectiveFrom":"2026-10-01T00:00:00.000Z","effectiveUntil":null,"currencies":[{"currency":"USD","decimals":2,"rounding":"half_even","source":{"authority":"publisher","source":"ISO 4217: USD minor unit 2","sourced":true,"document":null}}]}}}'import requests
url = "https://app.trdrs.co/api/partner/venues/{venueId}/risk-policies"
payload = { "policy": {
"policyId": "meridian-futures",
"version": "2026-10-01",
"authority": {
"kind": "firm",
"venueId": "00000000-0000-0000-0000-000000000001",
"name": "Meridian Futures"
},
"currency": "USD",
"pools": {
"futures": {
"margin": {
"version": "margin-2026-10-01",
"authority": "firm",
"source": "the venue's own terms",
"effectiveFrom": "2026-10-01T00:00:00.000Z",
"effectiveUntil": None,
"asset": "USD",
"basis": "per_contract",
"window": {
"timeZone": "America/Chicago",
"startMinute": 510,
"exposureCutoffMinute": 900,
"endMinute": 915,
"weekdays": [1, 2, 3, 4, 5],
"closedDates": []
},
"closeOnly": "at_roll",
"contracts": [
{
"contract": "CME:NQZ2026",
"root": "NQ",
"day": {
"initial": "1000",
"maintenance": "500",
"sources": {
"initial": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": True
},
"maintenance": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": True
}
}
},
"overnight": {
"initial": "43207",
"maintenance": "43207",
"sources": {
"initial": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": True
},
"maintenance": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": True
}
}
}
}
]
},
"thresholds": {
"version": "thresholds-2026-10-01",
"authority": "firm",
"source": "the venue's own terms",
"effectiveFrom": "2026-10-01T00:00:00.000Z",
"effectiveUntil": None,
"marginCall": None,
"stopOut": "1",
"recoveryLevel": "1.1",
"sources": {
"marginCall": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": True
},
"stopOut": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": True
},
"recoveryLevel": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": True
}
}
},
"valuation": {
"version": "valuation-2026-10-01",
"authority": "firm",
"source": "the venue's own terms",
"effectiveFrom": "2026-10-01T00:00:00.000Z",
"effectiveUntil": None,
"maxAgeMs": 5000
},
"ticketHedging": None
},
"crypto_derivative": None
},
"settlement": {
"version": "settlement-2026-10-01",
"authority": "firm",
"source": "the venue's own terms",
"effectiveFrom": "2026-10-01T00:00:00.000Z",
"effectiveUntil": None,
"kind": "settlement_asset"
},
"posting": {
"version": "posting-2026-10-01",
"authority": "firm",
"source": "the venue's own terms",
"effectiveFrom": "2026-10-01T00:00:00.000Z",
"effectiveUntil": None,
"currencies": [
{
"currency": "USD",
"decimals": 2,
"rounding": "half_even",
"source": {
"authority": "publisher",
"source": "ISO 4217: USD minor unit 2",
"sourced": True,
"document": None
}
}
]
}
} }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.trdrs.co/api/partner/venues/{venueId}/risk-policies",
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([
'policy' => [
'policyId' => 'meridian-futures',
'version' => '2026-10-01',
'authority' => [
'kind' => 'firm',
'venueId' => '00000000-0000-0000-0000-000000000001',
'name' => 'Meridian Futures'
],
'currency' => 'USD',
'pools' => [
'futures' => [
'margin' => [
'version' => 'margin-2026-10-01',
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'effectiveFrom' => '2026-10-01T00:00:00.000Z',
'effectiveUntil' => null,
'asset' => 'USD',
'basis' => 'per_contract',
'window' => [
'timeZone' => 'America/Chicago',
'startMinute' => 510,
'exposureCutoffMinute' => 900,
'endMinute' => 915,
'weekdays' => [
1,
2,
3,
4,
5
],
'closedDates' => [
]
],
'closeOnly' => 'at_roll',
'contracts' => [
[
'contract' => 'CME:NQZ2026',
'root' => 'NQ',
'day' => [
'initial' => '1000',
'maintenance' => '500',
'sources' => [
'initial' => [
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'sourced' => true
],
'maintenance' => [
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'sourced' => true
]
]
],
'overnight' => [
'initial' => '43207',
'maintenance' => '43207',
'sources' => [
'initial' => [
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'sourced' => true
],
'maintenance' => [
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'sourced' => true
]
]
]
]
]
],
'thresholds' => [
'version' => 'thresholds-2026-10-01',
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'effectiveFrom' => '2026-10-01T00:00:00.000Z',
'effectiveUntil' => null,
'marginCall' => null,
'stopOut' => '1',
'recoveryLevel' => '1.1',
'sources' => [
'marginCall' => [
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'sourced' => true
],
'stopOut' => [
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'sourced' => true
],
'recoveryLevel' => [
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'sourced' => true
]
]
],
'valuation' => [
'version' => 'valuation-2026-10-01',
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'effectiveFrom' => '2026-10-01T00:00:00.000Z',
'effectiveUntil' => null,
'maxAgeMs' => 5000
],
'ticketHedging' => null
],
'crypto_derivative' => null
],
'settlement' => [
'version' => 'settlement-2026-10-01',
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'effectiveFrom' => '2026-10-01T00:00:00.000Z',
'effectiveUntil' => null,
'kind' => 'settlement_asset'
],
'posting' => [
'version' => 'posting-2026-10-01',
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'effectiveFrom' => '2026-10-01T00:00:00.000Z',
'effectiveUntil' => null,
'currencies' => [
[
'currency' => 'USD',
'decimals' => 2,
'rounding' => 'half_even',
'source' => [
'authority' => 'publisher',
'source' => 'ISO 4217: USD minor unit 2',
'sourced' => true,
'document' => null
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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://app.trdrs.co/api/partner/venues/{venueId}/risk-policies"
payload := strings.NewReader("{\n \"policy\": {\n \"policyId\": \"meridian-futures\",\n \"version\": \"2026-10-01\",\n \"authority\": {\n \"kind\": \"firm\",\n \"venueId\": \"00000000-0000-0000-0000-000000000001\",\n \"name\": \"Meridian Futures\"\n },\n \"currency\": \"USD\",\n \"pools\": {\n \"futures\": {\n \"margin\": {\n \"version\": \"margin-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"asset\": \"USD\",\n \"basis\": \"per_contract\",\n \"window\": {\n \"timeZone\": \"America/Chicago\",\n \"startMinute\": 510,\n \"exposureCutoffMinute\": 900,\n \"endMinute\": 915,\n \"weekdays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ],\n \"closedDates\": []\n },\n \"closeOnly\": \"at_roll\",\n \"contracts\": [\n {\n \"contract\": \"CME:NQZ2026\",\n \"root\": \"NQ\",\n \"day\": {\n \"initial\": \"1000\",\n \"maintenance\": \"500\",\n \"sources\": {\n \"initial\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"maintenance\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n }\n }\n },\n \"overnight\": {\n \"initial\": \"43207\",\n \"maintenance\": \"43207\",\n \"sources\": {\n \"initial\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"maintenance\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n }\n }\n }\n }\n ]\n },\n \"thresholds\": {\n \"version\": \"thresholds-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"marginCall\": null,\n \"stopOut\": \"1\",\n \"recoveryLevel\": \"1.1\",\n \"sources\": {\n \"marginCall\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"stopOut\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"recoveryLevel\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n }\n }\n },\n \"valuation\": {\n \"version\": \"valuation-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"maxAgeMs\": 5000\n },\n \"ticketHedging\": null\n },\n \"crypto_derivative\": null\n },\n \"settlement\": {\n \"version\": \"settlement-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"kind\": \"settlement_asset\"\n },\n \"posting\": {\n \"version\": \"posting-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"currencies\": [\n {\n \"currency\": \"USD\",\n \"decimals\": 2,\n \"rounding\": \"half_even\",\n \"source\": {\n \"authority\": \"publisher\",\n \"source\": \"ISO 4217: USD minor unit 2\",\n \"sourced\": true,\n \"document\": null\n }\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://app.trdrs.co/api/partner/venues/{venueId}/risk-policies")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"policy\": {\n \"policyId\": \"meridian-futures\",\n \"version\": \"2026-10-01\",\n \"authority\": {\n \"kind\": \"firm\",\n \"venueId\": \"00000000-0000-0000-0000-000000000001\",\n \"name\": \"Meridian Futures\"\n },\n \"currency\": \"USD\",\n \"pools\": {\n \"futures\": {\n \"margin\": {\n \"version\": \"margin-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"asset\": \"USD\",\n \"basis\": \"per_contract\",\n \"window\": {\n \"timeZone\": \"America/Chicago\",\n \"startMinute\": 510,\n \"exposureCutoffMinute\": 900,\n \"endMinute\": 915,\n \"weekdays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ],\n \"closedDates\": []\n },\n \"closeOnly\": \"at_roll\",\n \"contracts\": [\n {\n \"contract\": \"CME:NQZ2026\",\n \"root\": \"NQ\",\n \"day\": {\n \"initial\": \"1000\",\n \"maintenance\": \"500\",\n \"sources\": {\n \"initial\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"maintenance\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n }\n }\n },\n \"overnight\": {\n \"initial\": \"43207\",\n \"maintenance\": \"43207\",\n \"sources\": {\n \"initial\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"maintenance\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n }\n }\n }\n }\n ]\n },\n \"thresholds\": {\n \"version\": \"thresholds-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"marginCall\": null,\n \"stopOut\": \"1\",\n \"recoveryLevel\": \"1.1\",\n \"sources\": {\n \"marginCall\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"stopOut\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"recoveryLevel\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n }\n }\n },\n \"valuation\": {\n \"version\": \"valuation-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"maxAgeMs\": 5000\n },\n \"ticketHedging\": null\n },\n \"crypto_derivative\": null\n },\n \"settlement\": {\n \"version\": \"settlement-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"kind\": \"settlement_asset\"\n },\n \"posting\": {\n \"version\": \"posting-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"currencies\": [\n {\n \"currency\": \"USD\",\n \"decimals\": 2,\n \"rounding\": \"half_even\",\n \"source\": {\n \"authority\": \"publisher\",\n \"source\": \"ISO 4217: USD minor unit 2\",\n \"sourced\": true,\n \"document\": null\n }\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/partner/venues/{venueId}/risk-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"policy\": {\n \"policyId\": \"meridian-futures\",\n \"version\": \"2026-10-01\",\n \"authority\": {\n \"kind\": \"firm\",\n \"venueId\": \"00000000-0000-0000-0000-000000000001\",\n \"name\": \"Meridian Futures\"\n },\n \"currency\": \"USD\",\n \"pools\": {\n \"futures\": {\n \"margin\": {\n \"version\": \"margin-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"asset\": \"USD\",\n \"basis\": \"per_contract\",\n \"window\": {\n \"timeZone\": \"America/Chicago\",\n \"startMinute\": 510,\n \"exposureCutoffMinute\": 900,\n \"endMinute\": 915,\n \"weekdays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ],\n \"closedDates\": []\n },\n \"closeOnly\": \"at_roll\",\n \"contracts\": [\n {\n \"contract\": \"CME:NQZ2026\",\n \"root\": \"NQ\",\n \"day\": {\n \"initial\": \"1000\",\n \"maintenance\": \"500\",\n \"sources\": {\n \"initial\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"maintenance\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n }\n }\n },\n \"overnight\": {\n \"initial\": \"43207\",\n \"maintenance\": \"43207\",\n \"sources\": {\n \"initial\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"maintenance\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n }\n }\n }\n }\n ]\n },\n \"thresholds\": {\n \"version\": \"thresholds-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"marginCall\": null,\n \"stopOut\": \"1\",\n \"recoveryLevel\": \"1.1\",\n \"sources\": {\n \"marginCall\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"stopOut\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"recoveryLevel\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n }\n }\n },\n \"valuation\": {\n \"version\": \"valuation-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"maxAgeMs\": 5000\n },\n \"ticketHedging\": null\n },\n \"crypto_derivative\": null\n },\n \"settlement\": {\n \"version\": \"settlement-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"kind\": \"settlement_asset\"\n },\n \"posting\": {\n \"version\": \"posting-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"currencies\": [\n {\n \"currency\": \"USD\",\n \"decimals\": 2,\n \"rounding\": \"half_even\",\n \"source\": {\n \"authority\": \"publisher\",\n \"source\": \"ISO 4217: USD minor unit 2\",\n \"sourced\": true,\n \"document\": null\n }\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"version": {
"policyId": "meridian-futures",
"version": "2026-10-01",
"contentDigest": "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"created": true
}
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}Store a risk policy version
Stores one version of a risk policy: the margin, stop-out, valuation, settlement and posting terms your accounts are held to. A stored version applies to no account until you publish it, and it can never change, so a changed term is always a new version. The response names the version, and the same content sent again returns it with created: false and status 200. Required scope: venue:configure. Preview: served on the sandbox to every venue, and production availability is arranged when a venue qualifies. Trading API keys and Partner keys do not authorize these routes.
const res = await fetch('https://app.trdrs.co/api/partner/venues/{venueId}/risk-policies', {
method: 'POST',
headers: {
'content-type': 'application/json',
Authorization: `Bearer ${process.env.TRDRS_VENUE_KEY}`,
"Idempotency-Key": "example-request-1",
},
body: JSON.stringify({
"policy": {
"policyId": "meridian-futures",
"version": "2026-10-01",
"authority": {
"kind": "firm",
"venueId": "00000000-0000-0000-0000-000000000001",
"name": "Meridian Futures"
},
"currency": "USD",
"pools": {
"futures": {
"margin": {
"version": "margin-2026-10-01",
"authority": "firm",
"source": "the venue's own terms",
"effectiveFrom": "2026-10-01T00:00:00.000Z",
"effectiveUntil": null,
"asset": "USD",
"basis": "per_contract",
"window": {
"timeZone": "America/Chicago",
"startMinute": 510,
"exposureCutoffMinute": 900,
"endMinute": 915,
"weekdays": [
1,
2,
3,
4,
5
],
"closedDates": []
},
"closeOnly": "at_roll",
"contracts": [
{
"contract": "CME:NQZ2026",
"root": "NQ",
"day": {
"initial": "1000",
"maintenance": "500",
"sources": {
"initial": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": true
},
"maintenance": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": true
}
}
},
"overnight": {
"initial": "43207",
"maintenance": "43207",
"sources": {
"initial": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": true
},
"maintenance": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": true
}
}
}
}
]
},
"thresholds": {
"version": "thresholds-2026-10-01",
"authority": "firm",
"source": "the venue's own terms",
"effectiveFrom": "2026-10-01T00:00:00.000Z",
"effectiveUntil": null,
"marginCall": null,
"stopOut": "1",
"recoveryLevel": "1.1",
"sources": {
"marginCall": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": true
},
"stopOut": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": true
},
"recoveryLevel": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": true
}
}
},
"valuation": {
"version": "valuation-2026-10-01",
"authority": "firm",
"source": "the venue's own terms",
"effectiveFrom": "2026-10-01T00:00:00.000Z",
"effectiveUntil": null,
"maxAgeMs": 5000
},
"ticketHedging": null
},
"crypto_derivative": null
},
"settlement": {
"version": "settlement-2026-10-01",
"authority": "firm",
"source": "the venue's own terms",
"effectiveFrom": "2026-10-01T00:00:00.000Z",
"effectiveUntil": null,
"kind": "settlement_asset"
},
"posting": {
"version": "posting-2026-10-01",
"authority": "firm",
"source": "the venue's own terms",
"effectiveFrom": "2026-10-01T00:00:00.000Z",
"effectiveUntil": null,
"currencies": [
{
"currency": "USD",
"decimals": 2,
"rounding": "half_even",
"source": {
"authority": "publisher",
"source": "ISO 4217: USD minor unit 2",
"sourced": true,
"document": null
}
}
]
}
}
}),
})
const data = await res.json()curl -X POST 'https://app.trdrs.co/api/partner/venues/{venueId}/risk-policies' \
-H "Authorization: Bearer $TRDRS_VENUE_KEY" \
-H 'Idempotency-Key: example-request-1' \
-H 'content-type: application/json' \
-d '{"policy":{"policyId":"meridian-futures","version":"2026-10-01","authority":{"kind":"firm","venueId":"00000000-0000-0000-0000-000000000001","name":"Meridian Futures"},"currency":"USD","pools":{"futures":{"margin":{"version":"margin-2026-10-01","authority":"firm","source":"the venue's own terms","effectiveFrom":"2026-10-01T00:00:00.000Z","effectiveUntil":null,"asset":"USD","basis":"per_contract","window":{"timeZone":"America/Chicago","startMinute":510,"exposureCutoffMinute":900,"endMinute":915,"weekdays":[1,2,3,4,5],"closedDates":[]},"closeOnly":"at_roll","contracts":[{"contract":"CME:NQZ2026","root":"NQ","day":{"initial":"1000","maintenance":"500","sources":{"initial":{"authority":"firm","source":"the venue's own terms","sourced":true},"maintenance":{"authority":"firm","source":"the venue's own terms","sourced":true}}},"overnight":{"initial":"43207","maintenance":"43207","sources":{"initial":{"authority":"firm","source":"the venue's own terms","sourced":true},"maintenance":{"authority":"firm","source":"the venue's own terms","sourced":true}}}}]},"thresholds":{"version":"thresholds-2026-10-01","authority":"firm","source":"the venue's own terms","effectiveFrom":"2026-10-01T00:00:00.000Z","effectiveUntil":null,"marginCall":null,"stopOut":"1","recoveryLevel":"1.1","sources":{"marginCall":{"authority":"firm","source":"the venue's own terms","sourced":true},"stopOut":{"authority":"firm","source":"the venue's own terms","sourced":true},"recoveryLevel":{"authority":"firm","source":"the venue's own terms","sourced":true}}},"valuation":{"version":"valuation-2026-10-01","authority":"firm","source":"the venue's own terms","effectiveFrom":"2026-10-01T00:00:00.000Z","effectiveUntil":null,"maxAgeMs":5000},"ticketHedging":null},"crypto_derivative":null},"settlement":{"version":"settlement-2026-10-01","authority":"firm","source":"the venue's own terms","effectiveFrom":"2026-10-01T00:00:00.000Z","effectiveUntil":null,"kind":"settlement_asset"},"posting":{"version":"posting-2026-10-01","authority":"firm","source":"the venue's own terms","effectiveFrom":"2026-10-01T00:00:00.000Z","effectiveUntil":null,"currencies":[{"currency":"USD","decimals":2,"rounding":"half_even","source":{"authority":"publisher","source":"ISO 4217: USD minor unit 2","sourced":true,"document":null}}]}}}'import requests
url = "https://app.trdrs.co/api/partner/venues/{venueId}/risk-policies"
payload = { "policy": {
"policyId": "meridian-futures",
"version": "2026-10-01",
"authority": {
"kind": "firm",
"venueId": "00000000-0000-0000-0000-000000000001",
"name": "Meridian Futures"
},
"currency": "USD",
"pools": {
"futures": {
"margin": {
"version": "margin-2026-10-01",
"authority": "firm",
"source": "the venue's own terms",
"effectiveFrom": "2026-10-01T00:00:00.000Z",
"effectiveUntil": None,
"asset": "USD",
"basis": "per_contract",
"window": {
"timeZone": "America/Chicago",
"startMinute": 510,
"exposureCutoffMinute": 900,
"endMinute": 915,
"weekdays": [1, 2, 3, 4, 5],
"closedDates": []
},
"closeOnly": "at_roll",
"contracts": [
{
"contract": "CME:NQZ2026",
"root": "NQ",
"day": {
"initial": "1000",
"maintenance": "500",
"sources": {
"initial": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": True
},
"maintenance": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": True
}
}
},
"overnight": {
"initial": "43207",
"maintenance": "43207",
"sources": {
"initial": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": True
},
"maintenance": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": True
}
}
}
}
]
},
"thresholds": {
"version": "thresholds-2026-10-01",
"authority": "firm",
"source": "the venue's own terms",
"effectiveFrom": "2026-10-01T00:00:00.000Z",
"effectiveUntil": None,
"marginCall": None,
"stopOut": "1",
"recoveryLevel": "1.1",
"sources": {
"marginCall": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": True
},
"stopOut": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": True
},
"recoveryLevel": {
"authority": "firm",
"source": "the venue's own terms",
"sourced": True
}
}
},
"valuation": {
"version": "valuation-2026-10-01",
"authority": "firm",
"source": "the venue's own terms",
"effectiveFrom": "2026-10-01T00:00:00.000Z",
"effectiveUntil": None,
"maxAgeMs": 5000
},
"ticketHedging": None
},
"crypto_derivative": None
},
"settlement": {
"version": "settlement-2026-10-01",
"authority": "firm",
"source": "the venue's own terms",
"effectiveFrom": "2026-10-01T00:00:00.000Z",
"effectiveUntil": None,
"kind": "settlement_asset"
},
"posting": {
"version": "posting-2026-10-01",
"authority": "firm",
"source": "the venue's own terms",
"effectiveFrom": "2026-10-01T00:00:00.000Z",
"effectiveUntil": None,
"currencies": [
{
"currency": "USD",
"decimals": 2,
"rounding": "half_even",
"source": {
"authority": "publisher",
"source": "ISO 4217: USD minor unit 2",
"sourced": True,
"document": None
}
}
]
}
} }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.trdrs.co/api/partner/venues/{venueId}/risk-policies",
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([
'policy' => [
'policyId' => 'meridian-futures',
'version' => '2026-10-01',
'authority' => [
'kind' => 'firm',
'venueId' => '00000000-0000-0000-0000-000000000001',
'name' => 'Meridian Futures'
],
'currency' => 'USD',
'pools' => [
'futures' => [
'margin' => [
'version' => 'margin-2026-10-01',
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'effectiveFrom' => '2026-10-01T00:00:00.000Z',
'effectiveUntil' => null,
'asset' => 'USD',
'basis' => 'per_contract',
'window' => [
'timeZone' => 'America/Chicago',
'startMinute' => 510,
'exposureCutoffMinute' => 900,
'endMinute' => 915,
'weekdays' => [
1,
2,
3,
4,
5
],
'closedDates' => [
]
],
'closeOnly' => 'at_roll',
'contracts' => [
[
'contract' => 'CME:NQZ2026',
'root' => 'NQ',
'day' => [
'initial' => '1000',
'maintenance' => '500',
'sources' => [
'initial' => [
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'sourced' => true
],
'maintenance' => [
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'sourced' => true
]
]
],
'overnight' => [
'initial' => '43207',
'maintenance' => '43207',
'sources' => [
'initial' => [
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'sourced' => true
],
'maintenance' => [
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'sourced' => true
]
]
]
]
]
],
'thresholds' => [
'version' => 'thresholds-2026-10-01',
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'effectiveFrom' => '2026-10-01T00:00:00.000Z',
'effectiveUntil' => null,
'marginCall' => null,
'stopOut' => '1',
'recoveryLevel' => '1.1',
'sources' => [
'marginCall' => [
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'sourced' => true
],
'stopOut' => [
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'sourced' => true
],
'recoveryLevel' => [
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'sourced' => true
]
]
],
'valuation' => [
'version' => 'valuation-2026-10-01',
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'effectiveFrom' => '2026-10-01T00:00:00.000Z',
'effectiveUntil' => null,
'maxAgeMs' => 5000
],
'ticketHedging' => null
],
'crypto_derivative' => null
],
'settlement' => [
'version' => 'settlement-2026-10-01',
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'effectiveFrom' => '2026-10-01T00:00:00.000Z',
'effectiveUntil' => null,
'kind' => 'settlement_asset'
],
'posting' => [
'version' => 'posting-2026-10-01',
'authority' => 'firm',
'source' => 'the venue\'s own terms',
'effectiveFrom' => '2026-10-01T00:00:00.000Z',
'effectiveUntil' => null,
'currencies' => [
[
'currency' => 'USD',
'decimals' => 2,
'rounding' => 'half_even',
'source' => [
'authority' => 'publisher',
'source' => 'ISO 4217: USD minor unit 2',
'sourced' => true,
'document' => null
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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://app.trdrs.co/api/partner/venues/{venueId}/risk-policies"
payload := strings.NewReader("{\n \"policy\": {\n \"policyId\": \"meridian-futures\",\n \"version\": \"2026-10-01\",\n \"authority\": {\n \"kind\": \"firm\",\n \"venueId\": \"00000000-0000-0000-0000-000000000001\",\n \"name\": \"Meridian Futures\"\n },\n \"currency\": \"USD\",\n \"pools\": {\n \"futures\": {\n \"margin\": {\n \"version\": \"margin-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"asset\": \"USD\",\n \"basis\": \"per_contract\",\n \"window\": {\n \"timeZone\": \"America/Chicago\",\n \"startMinute\": 510,\n \"exposureCutoffMinute\": 900,\n \"endMinute\": 915,\n \"weekdays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ],\n \"closedDates\": []\n },\n \"closeOnly\": \"at_roll\",\n \"contracts\": [\n {\n \"contract\": \"CME:NQZ2026\",\n \"root\": \"NQ\",\n \"day\": {\n \"initial\": \"1000\",\n \"maintenance\": \"500\",\n \"sources\": {\n \"initial\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"maintenance\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n }\n }\n },\n \"overnight\": {\n \"initial\": \"43207\",\n \"maintenance\": \"43207\",\n \"sources\": {\n \"initial\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"maintenance\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n }\n }\n }\n }\n ]\n },\n \"thresholds\": {\n \"version\": \"thresholds-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"marginCall\": null,\n \"stopOut\": \"1\",\n \"recoveryLevel\": \"1.1\",\n \"sources\": {\n \"marginCall\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"stopOut\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"recoveryLevel\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n }\n }\n },\n \"valuation\": {\n \"version\": \"valuation-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"maxAgeMs\": 5000\n },\n \"ticketHedging\": null\n },\n \"crypto_derivative\": null\n },\n \"settlement\": {\n \"version\": \"settlement-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"kind\": \"settlement_asset\"\n },\n \"posting\": {\n \"version\": \"posting-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"currencies\": [\n {\n \"currency\": \"USD\",\n \"decimals\": 2,\n \"rounding\": \"half_even\",\n \"source\": {\n \"authority\": \"publisher\",\n \"source\": \"ISO 4217: USD minor unit 2\",\n \"sourced\": true,\n \"document\": null\n }\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://app.trdrs.co/api/partner/venues/{venueId}/risk-policies")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"policy\": {\n \"policyId\": \"meridian-futures\",\n \"version\": \"2026-10-01\",\n \"authority\": {\n \"kind\": \"firm\",\n \"venueId\": \"00000000-0000-0000-0000-000000000001\",\n \"name\": \"Meridian Futures\"\n },\n \"currency\": \"USD\",\n \"pools\": {\n \"futures\": {\n \"margin\": {\n \"version\": \"margin-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"asset\": \"USD\",\n \"basis\": \"per_contract\",\n \"window\": {\n \"timeZone\": \"America/Chicago\",\n \"startMinute\": 510,\n \"exposureCutoffMinute\": 900,\n \"endMinute\": 915,\n \"weekdays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ],\n \"closedDates\": []\n },\n \"closeOnly\": \"at_roll\",\n \"contracts\": [\n {\n \"contract\": \"CME:NQZ2026\",\n \"root\": \"NQ\",\n \"day\": {\n \"initial\": \"1000\",\n \"maintenance\": \"500\",\n \"sources\": {\n \"initial\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"maintenance\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n }\n }\n },\n \"overnight\": {\n \"initial\": \"43207\",\n \"maintenance\": \"43207\",\n \"sources\": {\n \"initial\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"maintenance\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n }\n }\n }\n }\n ]\n },\n \"thresholds\": {\n \"version\": \"thresholds-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"marginCall\": null,\n \"stopOut\": \"1\",\n \"recoveryLevel\": \"1.1\",\n \"sources\": {\n \"marginCall\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"stopOut\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"recoveryLevel\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n }\n }\n },\n \"valuation\": {\n \"version\": \"valuation-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"maxAgeMs\": 5000\n },\n \"ticketHedging\": null\n },\n \"crypto_derivative\": null\n },\n \"settlement\": {\n \"version\": \"settlement-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"kind\": \"settlement_asset\"\n },\n \"posting\": {\n \"version\": \"posting-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"currencies\": [\n {\n \"currency\": \"USD\",\n \"decimals\": 2,\n \"rounding\": \"half_even\",\n \"source\": {\n \"authority\": \"publisher\",\n \"source\": \"ISO 4217: USD minor unit 2\",\n \"sourced\": true,\n \"document\": null\n }\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/partner/venues/{venueId}/risk-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"policy\": {\n \"policyId\": \"meridian-futures\",\n \"version\": \"2026-10-01\",\n \"authority\": {\n \"kind\": \"firm\",\n \"venueId\": \"00000000-0000-0000-0000-000000000001\",\n \"name\": \"Meridian Futures\"\n },\n \"currency\": \"USD\",\n \"pools\": {\n \"futures\": {\n \"margin\": {\n \"version\": \"margin-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"asset\": \"USD\",\n \"basis\": \"per_contract\",\n \"window\": {\n \"timeZone\": \"America/Chicago\",\n \"startMinute\": 510,\n \"exposureCutoffMinute\": 900,\n \"endMinute\": 915,\n \"weekdays\": [\n 1,\n 2,\n 3,\n 4,\n 5\n ],\n \"closedDates\": []\n },\n \"closeOnly\": \"at_roll\",\n \"contracts\": [\n {\n \"contract\": \"CME:NQZ2026\",\n \"root\": \"NQ\",\n \"day\": {\n \"initial\": \"1000\",\n \"maintenance\": \"500\",\n \"sources\": {\n \"initial\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"maintenance\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n }\n }\n },\n \"overnight\": {\n \"initial\": \"43207\",\n \"maintenance\": \"43207\",\n \"sources\": {\n \"initial\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"maintenance\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n }\n }\n }\n }\n ]\n },\n \"thresholds\": {\n \"version\": \"thresholds-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"marginCall\": null,\n \"stopOut\": \"1\",\n \"recoveryLevel\": \"1.1\",\n \"sources\": {\n \"marginCall\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"stopOut\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n },\n \"recoveryLevel\": {\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"sourced\": true\n }\n }\n },\n \"valuation\": {\n \"version\": \"valuation-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"maxAgeMs\": 5000\n },\n \"ticketHedging\": null\n },\n \"crypto_derivative\": null\n },\n \"settlement\": {\n \"version\": \"settlement-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"kind\": \"settlement_asset\"\n },\n \"posting\": {\n \"version\": \"posting-2026-10-01\",\n \"authority\": \"firm\",\n \"source\": \"the venue's own terms\",\n \"effectiveFrom\": \"2026-10-01T00:00:00.000Z\",\n \"effectiveUntil\": null,\n \"currencies\": [\n {\n \"currency\": \"USD\",\n \"decimals\": 2,\n \"rounding\": \"half_even\",\n \"source\": {\n \"authority\": \"publisher\",\n \"source\": \"ISO 4217: USD minor unit 2\",\n \"sourced\": true,\n \"document\": null\n }\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"version": {
"policyId": "meridian-futures",
"version": "2026-10-01",
"contentDigest": "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"created": true
}
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}Authorizations
The Venue key (trdrs_vk_sandbox_… or trdrs_vk_production_…), in preview. It belongs to one venue in one environment and carries the scopes it was created with. The venue's verified owner creates it while signed in, and it works only on the /api/partner/venues/{venueId} routes. A trdrs_sk_… key can't be used in its place. It never lets you act as a trader, sign in or manage keys. Keep it on your server.
Headers
A key you choose, 1 to 128 characters, that identifies this write. Send the same key when you retry it, so the write is never applied twice.
1 - 128Path Parameters
Body
One version of an account risk policy, as the risk policy contract states it: the policy id and version, the authority (a firm, naming this venue), the account currency, the terms of each product class it offers, the settlement term and the posting term. A product class carries its futures margin by dated contract or its crypto derivative collateral, its thresholds and its valuation age, each term with its own version, authority, source and effective dates. Anything else is refused, with field naming what.
Response
Success. The response is sent with Cache-Control: no-store, so don't cache it.
Show child attributes
Show child attributes