QuickTrade
Execute trades instantly with just one API call using your organization's API key. QuickTrade automatically generates a quote and executes your order immediately, eliminating the need for separate quote and submit steps.
Request URL
POST https://ddp.definitive.fi/v2/organization/portfolios/{portfolioId}/quicktrade
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
portfolioId | string | Yes | UUID of the portfolio |
Example
// Execute a trade directly - no quote step needed!
const tradeResponse = await AuthHelpers.signAndSend({
path: "/v2/organization/portfolios/00000000-0000-0000-0000-000000000001/quicktrade",
method: "POST",
body: {
chain: "ethereum",
targetAsset: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", // WETH
contraAsset: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", // USDC
qty: "1000",
orderSide: "buy",
},
apiKey: process.env.ORG_API_KEY,
apiSecret: process.env.ORG_API_SECRET,
});
console.log("Trade executed!", tradeResponse);
Request Body
{
chain: string, // e.g. "ethereum", "polygon", "arbitrum"
targetAsset: string, // Asset address you want to buy/sell
contraAsset: string, // Asset address you're trading against
qty: string, // Quantity to trade
orderSide: "buy" | "sell",
slippageTolerance: "0.01",
displayAssetPrice: "4454.24" // optional: notional price of target asset
}
Note: please set slippageTolerance and displayAssetPrice for price protection.
Response
{
"orderId": "00000000-0000-0000-0000-000000000005"
}
Benefits
- Faster execution: Single API call instead of quote → submit flow
- Reduced latency: No network round-trip between quote and execution
- Simpler integration: Less code and fewer edge cases to handle
- Atomic operation: Quote and execution happen together, reducing slippage risk
- Organization-level: Use your organization's API credentials and fee structure
Rate Limiting
QuickTrade endpoints have custom rate limiting to balance speed with system stability. The limits are higher than standard endpoints to support legitimate high-frequency trading.
Optional Quote Preview
If you want to preview pricing before executing, you can still use the quote endpoint:
POST https://ddp.definitive.fi/v2/organization/portfolios/{portfolioId}/quicktrade/quote
This returns the same quote structure as the regular trade quote endpoint.
Multi-Portfolio Trading
Organizations can execute quicktrades across multiple portfolios by specifying different portfolioId
values in the URL path. Each portfolio maintains its own balance and trading history.
References
Notes
- Requires organization-level API credentials
- Uses organization-specific fee structure and limits
- Portfolio ID must belong to the authenticated organization
- All standard trading validations and protections apply