curl --request GET \
--url https://apimonaco.xyz/api/v1/margin/parent-margin-account \
--header 'X-Monaco-Signature: <api-key>'import requests
url = "https://apimonaco.xyz/api/v1/margin/parent-margin-account"
headers = {"X-Monaco-Signature": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Monaco-Signature': '<api-key>'}};
fetch('https://apimonaco.xyz/api/v1/margin/parent-margin-account', 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://apimonaco.xyz/api/v1/margin/parent-margin-account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Monaco-Signature: <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"
"net/http"
"io"
)
func main() {
url := "https://apimonaco.xyz/api/v1/margin/parent-margin-account"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Monaco-Signature", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apimonaco.xyz/api/v1/margin/parent-margin-account")
.header("X-Monaco-Signature", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apimonaco.xyz/api/v1/margin/parent-margin-account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Monaco-Signature"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"marginAccountId": "<string>",
"equity": "<string>",
"initialMarginRequired": "<string>",
"maintenanceMarginRequired": "<string>",
"freeCollateral": "<string>",
"withdrawableCollateral": "<string>",
"totalPositionNotional": "<string>",
"unrealizedPnl": "<string>",
"realizedPnl": "<string>",
"updatedAt": "<string>",
"label": "<string>",
"tradingPairId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"strategyKey": "<string>",
"riskBucketId": "<string>",
"marginMode": "<string>",
"selectedTradingPairIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"availableOrderCollateral": "<string>",
"copyFollowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"copyLeaderHandle": "<string>",
"riskBucketState": "<string>",
"subaccountKey": "<string>",
"marginAccountState": "<string>",
"maxRemovableCollateral": "<string>"
}Get apiv1marginparent margin account
curl --request GET \
--url https://apimonaco.xyz/api/v1/margin/parent-margin-account \
--header 'X-Monaco-Signature: <api-key>'import requests
url = "https://apimonaco.xyz/api/v1/margin/parent-margin-account"
headers = {"X-Monaco-Signature": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Monaco-Signature': '<api-key>'}};
fetch('https://apimonaco.xyz/api/v1/margin/parent-margin-account', 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://apimonaco.xyz/api/v1/margin/parent-margin-account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Monaco-Signature: <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"
"net/http"
"io"
)
func main() {
url := "https://apimonaco.xyz/api/v1/margin/parent-margin-account"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Monaco-Signature", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apimonaco.xyz/api/v1/margin/parent-margin-account")
.header("X-Monaco-Signature", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apimonaco.xyz/api/v1/margin/parent-margin-account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Monaco-Signature"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"marginAccountId": "<string>",
"equity": "<string>",
"initialMarginRequired": "<string>",
"maintenanceMarginRequired": "<string>",
"freeCollateral": "<string>",
"withdrawableCollateral": "<string>",
"totalPositionNotional": "<string>",
"unrealizedPnl": "<string>",
"realizedPnl": "<string>",
"updatedAt": "<string>",
"label": "<string>",
"tradingPairId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"strategyKey": "<string>",
"riskBucketId": "<string>",
"marginMode": "<string>",
"selectedTradingPairIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"availableOrderCollateral": "<string>",
"copyFollowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"copyLeaderHandle": "<string>",
"riskBucketState": "<string>",
"subaccountKey": "<string>",
"marginAccountState": "<string>",
"maxRemovableCollateral": "<string>"
}Authorizations
Ed25519 session-key request signing. Every authenticated request carries three headers: X-Monaco-PublicKey (64-char lowercase-hex session public key), X-Monaco-Timestamp (Unix milliseconds, within 30s of server time), and X-Monaco-Signature (hex ed25519 signature). The signature is over METHOD\npath?query\ntimestamp_ms\nSHA256_hex(body), where the body hash is the SHA-256 of the empty byte string when there is no body. Obtain the session keypair from POST /api/v1/auth/challenge followed by POST /api/v1/auth/verify.
Response
OK
The largest amount a transfer-out of this scope accepts without lowering
any position's posted margin, so without moving a leverage or a
liquidation price. A removal from an isolated risk bucket with one open
position can take more, out of that position's margin: see
max_removable_collateral.
NOT a clamped free_collateral. Free collateral is equity headroom, and
equity includes mark-to-market gains that a transfer cannot move — so
the two can differ without limit. An unrealized gain never counts toward
this figure.
For a risk bucket this is the bucket's allocated collateral plus its realized PnL, less what its positions and resting orders require (the bucket's allocation may go negative, which is how realized profit leaves a live bucket); for a parent margin account, net deposits plus settled realized PnL that no risk bucket has allocated.
This is the largest accepted transfer-out, and every smaller amount is
accepted too. It is zero on a risk bucket that is not NORMAL (under
liquidation or frozen as bad debt), whose allocation cannot be released,
and on a risk bucket whose realized loss has used up its allocation: that
bucket cannot be released at all, and the parent margin account is
charged at most its allocation, the loss past it being the insurance
fund's.
Printed truncated toward zero at the quote asset's precision, so the printed amount itself is always accepted.
See MarginAccountSummary.available_order_collateral: the collateral
still available to open NEW orders in this risk bucket, the risk engine
admission gate's own bound with parent auto top-up included. Present only
on risk-bucket rows served from a live engine snapshot; absent on parent
rows and persisted-fallback reads.
Was this page helpful?

