curl --request GET \
--url https://arena-predictions.com/api/v1/portfolio/trades \
--header 'Authorization: Bearer <token>'import requests
url = "https://arena-predictions.com/api/v1/portfolio/trades"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://arena-predictions.com/api/v1/portfolio/trades', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"trades": [
{
"tradeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"instrumentId": "<string>",
"instrumentLabel": "<string>",
"instrumentSide": "yes",
"boughtSide": "yes",
"contracts": 123,
"costDollars": 123,
"statedProbPct": 123,
"placedVia": "<string>",
"placedPrivate": true,
"parlayId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fillVenue": "<string>",
"openedAt": "2023-11-07T05:31:56Z",
"status": "open",
"closedAt": "2023-11-07T05:31:56Z",
"closeReason": "<string>",
"pnlDollars": 123,
"resolvedOutcome": "yes",
"marketTicker": "<string>",
"entryCents": 123
}
],
"count": 123,
"nextCursor": "<string>",
"venueData": true,
"mode": "paper",
"organization": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}List your trades
A page of the key owner’s own trades, newest first, with the result of each settled one. Private picks included. With no X-Arena-Org header this is the personal account. With the header it is that organization’s paper sandbox, not the personal trade list, and organization.slug is set when the sandbox named one. Not cached.
curl --request GET \
--url https://arena-predictions.com/api/v1/portfolio/trades \
--header 'Authorization: Bearer <token>'import requests
url = "https://arena-predictions.com/api/v1/portfolio/trades"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://arena-predictions.com/api/v1/portfolio/trades', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"trades": [
{
"tradeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"instrumentId": "<string>",
"instrumentLabel": "<string>",
"instrumentSide": "yes",
"boughtSide": "yes",
"contracts": 123,
"costDollars": 123,
"statedProbPct": 123,
"placedVia": "<string>",
"placedPrivate": true,
"parlayId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fillVenue": "<string>",
"openedAt": "2023-11-07T05:31:56Z",
"status": "open",
"closedAt": "2023-11-07T05:31:56Z",
"closeReason": "<string>",
"pnlDollars": 123,
"resolvedOutcome": "yes",
"marketTicker": "<string>",
"entryCents": 123
}
],
"count": 123,
"nextCursor": "<string>",
"venueData": true,
"mode": "paper",
"organization": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}Authorizations
Authorization: Bearer arena_sk_... (the x-arena-key header is accepted too). Keys are made in Settings (https://arena-predictions.com/settings#api-keys) or with arena keys create, shown once, stored hashed.
Headers
Organization id. When present, this call uses that organization's paper sandbox. When absent, the key owner's personal paper account. A value that is not an organization id is 400 invalid_request. An unknown organization is 404 organization_not_found and one this key cannot use is 403 organization_forbidden. The personal account is never the fallback. Paper only. This header does not select a Combine evaluation account.
63Query Parameters
settled: won or lost. void: a push or a cancelled market.
open, settled, sold, void, all Opened at or after.
Opened before.
1 <= x <= 200The nextCursor of the previous page. Opaque.
Response
A page of trades.