Manage settings and OAuth2 clients with the Python SDK
settings = client.settings.get_user_settings("trading")
client.settings.update_user_setting("trading", "default_quantity", 100)
client.settings.reset_user_settings("trading")
clients = client.oauth_clients.get_clients() for c in clients: print(f"{c.name}: {c.client_id}")
oauth_client = client.oauth_clients.create_client( name="My Trading App", redirect_uris=["https://myapp.com/callback"] ) print(f"Client ID: {oauth_client.client_id}") print(f"Client Secret: {oauth_client.client_secret}")
client.oauth_clients.update_client( client_id="client_123", name="Updated App Name" )
client.oauth_clients.delete_client(client_id="client_123")
# Create OAuth2 application app = client.oauth_clients.create_client( name="Trading Bot", redirect_uris=["http://localhost:8080/callback"] ) print(f"Created client:") print(f" Client ID: {app.client_id}") print(f" Client Secret: {app.client_secret}") print("Save these credentials securely!")
Was this page helpful?