Broker Integration
Connecting brokerages
Argix Labs integrates with multiple brokerages through two primary patterns: OAuth (you approve access at the broker) and API credentials(keys, secrets, or access tokens you generate in the broker's developer or security console). Supported brokers and their current connection mode appear in Settings → Broker Connections and the broker marketplace in the product.
Per-broker reference
/docs/broker/<brokerId>—for example Alpaca or Interactive Brokers.Authentication models
OAuth (authorization code).Selecting a broker that uses OAuth opens a secure redirect to the broker's consent screen. After you approve the requested scopes, the broker returns the application to Argix Labs with an authorization result; tokens are stored server-side and are not exposed to the browser. Re-authorization may be required when refresh tokens expire or policies change—follow the in-app prompt to reconnect.
API keys and tokens.Brokers that accept static credentials require you to create an API key (and often a secret) or a long-lived access token in the broker's portal. Trading-capable permissions are required for order submission; read-only keys are insufficient for live execution. Many venues issue separate credentials for paper, demo, and live environments—use the pair that matches the mode you selected in Argix Labs.
Maintenance / docs-only integrations
OAuth connection (typical flow)
Choose the broker
Open Settings → Broker Connections (or the broker marketplace) and select a brokerage that lists OAuth as its connection method.
Start sign-in
Initiate connection; Argix Labs redirects your browser to the broker-hosted authorization page. No API secrets are typed into Argix Labs for this path.
Approve scopes
Review the consent screen: scopes define what Argix Labs may read or submit (accounts, balances, orders). Approve only if they match your intent.
Return to Argix Labs
After approval, you are returned to the application; the platform stores tokens according to its security model and marks the connection active.
Reconnect when required
If the broker invalidates refresh tokens or you revoke consent at the broker, use Disconnect / Connect again to complete a fresh authorization.
API key and token connection (typical flow)
Open the broker developer portal
Log in to your brokerage and open the API, security, or developer section where keys or access tokens are issued.
Create credentials with trading scope
Generate credentials with order placement enabled where applicable. Store the secret or private material immediately; many portals show it only once.
Select environment
If the broker separates paper and live endpoints, create or copy the credentials that correspond to the environment you will use in Argix Labs.
Enter credentials in Argix Labs
In Settings → Broker Connections, choose the broker, paste or enter the required fields, and run the connection test before saving.
Credential security
Broker credentials and tokens are handled as follows:
- Encrypted at rest using authenticated encryption where static secrets are stored
- Decrypted only in server memory for connectivity tests and order routing
- Not returned to the browser after submission
- Excluded from application logs in normal operation
Operational hygiene
Order execution
When strategy logic produces an order instruction, the platform submits it through the connected broker adapter using the stored authorization or credentials. A representative sequence:
1. Strategy graph evaluates → order intent2. Position sizer determines quantity3. Risk subsystem enforces limits4. Order submitted to broker API5. Broker routes to venue / internal matching6. Execution reports returned7. Dashboard and positions updatedAudit trails are retained for review.Client assets remain at the brokerage; Argix Labs does not take custody.Supported order types (general)
| Order type | Description |
|---|---|
| Market | Executes against available liquidity; slippage possible. |
| Limit | Price-bounded; non-fill risk if the market does not trade through. |
| Stop (market) | Becomes a market order once the stop trigger is touched. |
Exact availability and parameters depend on the broker and asset class.
Revoking access
Access can be withdrawn from either side:
- Remove or disable the connection in Argix Labs Settings
- Revoke OAuth consent or rotate API keys at the broker
- Close the Argix Labs account if you require full disassociation
In-flight orders
Troubleshooting
OAuth: redirect or consent errors
Ensure pop-up blockers allow the broker window; retry Connect. If the broker reports invalid client configuration, the deployment may still be in docs-only mode for that integration.
API key: authentication failed
Verify key/secret or token, environment (paper vs live), and clock skew. Confirm trading permissions are enabled where the broker distinguishes read vs trade scope.
Orders rejected or not placed
Check buying power, symbol eligibility, market session, and broker-specific constraints. Review risk blocks in the strategy graph.
Rate limiting
Brokers enforce request quotas. Reduce evaluation frequency or batch operations if you observe HTTP 429 or equivalent throttling responses.