from finance_dev import FinanceDev, models
import os
with FinanceDev(
security=models.Security(
client_id=os.getenv("FINANCEDEV_CLIENT_ID", ""),
client_secret=os.getenv("FINANCEDEV_CLIENT_SECRET", ""),
),
) as fd_client:
res = fd_client.accounts.get_user_accounts()
# Handle response
print(res){
"accounts": [
{
"id": 123,
"fdid": "<string>",
"apex_id": "<string>",
"apex_account_id": "<string>",
"sterling_account_id": "<string>",
"status": "<string>",
"apex_status": "<string>",
"is_sim": true,
"primary_user_id": 123,
"account_number": "<string>",
"type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}Retrieve all trading accounts for the currently authenticated user
from finance_dev import FinanceDev, models
import os
with FinanceDev(
security=models.Security(
client_id=os.getenv("FINANCEDEV_CLIENT_ID", ""),
client_secret=os.getenv("FINANCEDEV_CLIENT_SECRET", ""),
),
) as fd_client:
res = fd_client.accounts.get_user_accounts()
# Handle response
print(res){
"accounts": [
{
"id": 123,
"fdid": "<string>",
"apex_id": "<string>",
"apex_account_id": "<string>",
"sterling_account_id": "<string>",
"status": "<string>",
"apex_status": "<string>",
"is_sim": true,
"primary_user_id": 123,
"account_number": "<string>",
"type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}Documentation Index
Fetch the complete documentation index at: https://finance.dev/llms.txt
Use this file to discover all available pages before exploring further.
Was this page helpful?