Skip to navigation

ONEGO SDKs

Choose the right ONEGO SDK path for embedded trading, backend token issuance, account linkage, webhooks, and production operations.
View as Markdown

Choose an SDK path

Partner goalFrontendBackendWhy it matters
Add an embedded trading terminalTrading Widget SDKAgent SDKThe widget handles the trading UI while the partner backend issues tokens and keeps secrets private.
Create a native app entry pointNative or H5 entryAgent SDKThe app opens a ONEGO entry URL after the partner validates the user session.
Build a custom trading flowPartner UIDeveloper API + selected SDK flowsUse APIs for account, order, position, and market data while keeping operational controls server-side.

Reference architecture

Partner Web App
-> TradingWidget.create()
-> tokenProvider()
-> Partner Backend
-> ONEGO Agent SDK
-> ONEGO Agent API
-> ONEGO Trading iframe

Keep secrets server-side

Browser code should only call partner-owned endpoints. The Agent API secret must never be shipped to frontend code.

Production checklist

  • Store apiSecret only in backend infrastructure.
  • Use HTTPS for Agent API requests and webhook URLs.
  • Persist agentUserId, platformUserId, and agentOrderNo mappings.
  • Represent monetary amounts as decimal strings instead of floating-point values.
  • Handle PROCESSING as pending, not as success or failure.
  • Process webhooks idempotently because retries are expected.