Position history
GET
/api/trading/accounts/{account_id}/portfolio
const url = 'https://example.com/api/trading/accounts/1/portfolio?limit=50&offset=0';const options = { method: 'GET', headers: { 'INF-ACCESS-KEY': '<INF-ACCESS-KEY>', 'INF-ACCESS-TIMESTAMP': '<INF-ACCESS-TIMESTAMP>', 'INF-ACCESS-SIGNATURE': '<INF-ACCESS-SIGNATURE>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/trading/accounts/1/portfolio?limit=50&offset=0' \ --header 'INF-ACCESS-KEY: <INF-ACCESS-KEY>' \ --header 'INF-ACCESS-SIGNATURE: <INF-ACCESS-SIGNATURE>' \ --header 'INF-ACCESS-TIMESTAMP: <INF-ACCESS-TIMESTAMP>'Every position held, newest traded first, with its fills.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”account_id
required
Account Id
integer
Query Parameters
Section titled “Query Parameters”limit
Limit
integer
Page size, up to 200.
offset
Offset
integer
Rows to skip.
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Portfolio
object
total
required
Total
Every position the account has held.
integer
positions
required
Positions
Newest traded first.
Array<object>
HistoryPositionobject
market_id
required
Market Id
integer
market
required
outcome
required
Outcome
string
status
required
Status
string
quantity
required
Quantity
integer
cost_basis
required
Cost Basis
integer
realized_pnl
required
Realized Pnl
integer
fees
required
Fees
Fees paid less rebates, in units. realized_pnl leaves them out.
integer
pnl
required
Pnl
Realised so far. An open position’s unrealised part is left to the caller, who has the live price.
integer
fills
required
Fills
Newest first.
Array<object>
PositionFillobject
client_order_id
required
Client Order Id
integer
seq
required
Seq
integer
side
required
Side
string
outcome
required
Outcome
string
price_bps
required
Price Bps
integer
quantity
required
Quantity
integer
notional
required
Notional
integer
fee
required
Fee
Fee paid on this fill, in units. A maker’s rebate is negative.
integer
liquidity
required
Liquidity
taker if this fill’s order took liquidity, maker if it was resting.
string
reversed
required
Reversed
True once the vault skipped this fill and the exchange took it back: its cost, lots and fee were returned, and no total counts it.
boolean
Example
{ "positions": [ { "outcome": "up", "status": "open", "fills": [ { "side": "bid", "outcome": "up", "liquidity": "maker" } ] } ]}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}