Skip to content

Position history

GET
/api/trading/accounts/{account_id}/portfolio
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.

account_id
required
Account Id
integer
limit
Limit
integer
default: 50

Page size, up to 200.

offset
Offset
integer
0

Rows to skip.

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>
HistoryPosition
object
market_id
required
Market Id
integer
market
required
Any of:
MarketName
object
slug
required
Any of:
string
title
required
Any of:
string
category
required
Any of:
string
open_ms
required
Any of:
integer
expiry_ms
required
Any of:
integer
outcome
required
Outcome
string
Allowed values: up down
status
required
Status
string
Allowed values: open closed
quantity
required
Quantity
integer
cost_basis
required
Cost Basis
integer
avg_price_bps
required
Any of:
integer
realized_pnl
required
Realized Pnl
integer
fees
required
Fees

Fees paid less rebates, in units. realized_pnl leaves them out.

integer
payout
required
Any of:
integer
pnl
required
Pnl

Realised so far. An open position’s unrealised part is left to the caller, who has the live price.

integer
traded_at
required
Any of:
string
fills
required
Fills

Newest first.

Array<object>
PositionFill
object
client_order_id
required
Client Order Id
integer
seq
required
Seq
integer
side
required
Side
string
Allowed values: bid ask
outcome
required
Outcome
string
Allowed values: up down
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
Allowed values: maker taker
created_at
required
Any of:
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
reversed_reason
required
Any of:
string
Example
{
"positions": [
{
"outcome": "up",
"status": "open",
"fills": [
{
"side": "bid",
"outcome": "up",
"liquidity": "maker"
}
]
}
]
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
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": {}
}
]
}