Skip to main content

Overview

Daya Stocks follows a merchant-managed account model. Daya maintains the aggregate Stocks cash balance, positions, orders, and activity for your business; your business maintains the allocation of those assets across its own customers.

Responsibility model

Separate product balances

Stocks, Coins, and the Business API keep independent balances. Your interface may aggregate them for display, but that does not combine them into one spendable pool.
Check the Stocks cash balance before placing an order. A balance held in Coins or the Business API cannot be assumed to fund a Stocks trade. Cross-product funding is a separate operation and is not atomic with an order.

Customer allocation workflow

1

Record the instruction

Create an internal operation ID and record the customer, symbol, side, and requested amount or quantity.
2

Quote and order

Request a quote, then place the order with its quote_id. Save one Idempotency-Key for this logical order, reuse it for every retry, and store the returned Daya order ID.
3

Confirm the outcome

Process the terminal order webhook, or poll GET /orders/{id} until the order is filled or failed.
4

Post the allocation

Update the customer’s shares, cash, and fees exactly once.
5

Reconcile

Compare total customer allocations against the aggregate Daya Stocks balance and portfolio.

Reconciliation

Persist the last state processed for each order and transaction, make customer-ledger updates idempotent, and periodically compare the sum of customer allocations with the aggregate Daya balance and portfolio.
Configure signed order and money-movement webhooks in the Daya Dashboard. Keep API polling and periodic reconciliation as fallbacks for delayed, duplicated, or missed deliveries.