Skip to navigation

6MM Agent SDK

View as Markdown

The 6MM Agent SDK is for partner backend services that need to call privileged Agent APIs without implementing signing and request handling from scratch. It must not run in browser, mobile, or public desktop code because the integration uses a partner API secret.

When to use the Agent SDK

Use an Agent SDK when your backend needs to bind a partner user, move assets through an approved workflow, query trading records, create an embedded trading entry URL, or verify webhook notifications. Use the Trading Widget SDK separately when the partner frontend needs to display the trading interface.

Capabilities

ScenarioJava SDK
Bind userSupported
Fixed amount transferSupported
Transfer all outSupported
Reverse transferSupported
Query transfer ordersSupported
Create entry URLSupported
Webhook verificationSupported

Common configuration

KeyExampleDescription
baseUrlhttps://agent-api.6mm.com6MM Agent API service URL without trailing slash.
agentCodeAGENT001Partner agent code.
apiSecretyour-api-secretAPI signing secret stored only on the backend.
defaultCurrencyUSDTDefault currency for transfer and account APIs.
webhookUrlhttps://partner.example.com/6mm/webhookPartner endpoint for 6MM webhook notifications.

Typical integration flow

  1. The partner frontend authenticates the user through the partner’s own account system.
  2. The partner backend maps the user to a stable partner-side identifier.
  3. The backend calls the Agent SDK with agentCode and the protected API secret.
  4. The SDK signs and sends the Agent API request.
  5. The backend stores the returned business identifier and processes later webhooks idempotently.
  6. The frontend receives only the short-lived result or entry credential it needs.

Choose an SDK

Backend stackStart here
JavaJava SDK Overview and Java Quick Start

The PHP SDK has not been publicly released. To integrate it, please contact us to obtain the SDK, installation instructions, and available versions.

PHP SDK integration information

Production checklist

  • Load apiSecret from a backend secret manager, not source code.
  • Keep development, staging, and production credentials separate.
  • Use a stable partner user mapping and unique business order identifiers.
  • Preserve the original identifier when checking the status of a timed-out request.
  • Verify webhook signatures and store processed event IDs.
  • Redact secrets and signatures from logs while retaining request IDs for support.

Next steps

Java SDK v0.3.0 capabilities

Java SDK now includes Funding wallets, explicit funds environments, six perpetual-data queries, and fiat reference rates.

Business workflowJava v0.3.0 guide
Binding and Contract/Funding assetsUsers and assets
Contract transfers and transfer-order queriesContract transfers
Funding transfers and dedicated recovery queriesFunding wallet
Current/history orders, fills, positions and ledgerPerpetual queries
Seconds trading redirect and embeddingSeconds trading
Production and simulated fundsEnvironment guide
Updating an existing Java integrationUpgrade to v0.3.0