Get position and margin
Returns the current position, margin, and outstanding order sizes for a user address and instrument. Requires an `Authorization: Bearer` SIWE token proving control of `user`; otherwise 401.
Returns the current position, margin, and outstanding order sizes for a user
address and instrument. Requires an Authorization: Bearer SIWE token
proving control of user; otherwise 401.
bearer_authAuthorizationBearer <token>user*stringUser address in hex format (0x prefix optional)
instrument_bytes*stringInstrument identifier in hex format (0x prefix optional)
User instrument position and margin
application/json- response
A user's position in one instrument.
quantity and the outstanding_*_quantity fields are in WHOLE CONTRACTS —
the same unit as order quantity, scale factor 1 (position accumulates as
quantity += fill_quantity per fill; see
maen_order_store::UserInstrumentInfo::apply_trade). The margin fields are
in MICRO-DOLLARS (CASH_DENOMINATOR = 1e6 units per $1; one contract's full
notional = contract_notional·1e6 = 10_000_000). price on the wire is human
dollars.
Account-level balance/margin are deliberately absent — fetch them from
GET /account/{user}, which is their single source.
instrument*stringInstrument identifier as 0x-prefixed lowercase hex
outstanding_ask_margin*stringAsk-side margin locked by resting asks, micro-dollars (base-10 string).
outstanding_ask_quantity*integerTotal resting ask quantity, whole contracts.
int64outstanding_bid_margin*stringBid-side margin locked by resting bids, micro-dollars (base-10 string; CASH_DENOMINATOR = 1e6 per $1), net of position that nets against it.
outstanding_bid_quantity*integerTotal resting bid quantity, whole contracts.
int64quantity*stringSigned net position, whole contracts (base-10 string, may be negative).
Same unit as order quantity; scale factor 1 — no micro-scaling.
user*stringUser address as 0x-prefixed lowercase hex
curl -X GET 'https://testnet-api.scalar.market/account/string/positions/string'{ "instrument": "string", "outstanding_ask_margin": "string", "outstanding_ask_quantity": 0, "outstanding_bid_margin": "string", "outstanding_bid_quantity": 0, "quantity": "string", "user": "string"}Get account balance and margin GET
Returns the current balance and margin requirement for a user, after any accepted withdrawals have been subtracted from balance. Requires an `Authorization: Bearer` SIWE token proving control of `user`; otherwise 401.
Get a product GET
Returns details for a single product pointer.