Java Quick Start

Install and initialize the Java SDK from a backend service.
View as Markdown

Install

1<dependency>
2 <groupId>com.sixmm.agent</groupId>
3 <artifactId>sixmm-agent-sdk</artifactId>
4 <version>VERSION_PROVIDED_BY_6MM</version>
5</dependency>

Package access

6MM provides the approved package coordinates and version during partner onboarding. Use the package source configured for your organization.

Before you start

  • Confirm your production Agent API base URL with the 6MM team.
  • Store apiSecret in backend secret management only.
  • Prepare a stable mapping between platformUserId and agentUserId.
  • Enable structured logs around bind, transfer, order, and webhook flows.

Initialize client

1AgentClient client = new AgentClient(AgentClientConfig.builder()
2 .baseUrl("https://api.6mm.com/agent")
3 .agentCode("AGENT001")
4 .apiSecret("your-api-secret")
5 .defaultCurrency("USDT")
6 .build());

Backend only

Do not initialize the Agent SDK from browser, mobile, or desktop client code. The SDK signs privileged Agent API requests.

Example: transfer funds in

1TransferResponse resp = client.transfer(TransferRequest.fixed(
2 "AGT-ORDER-1001",
3 "agent-user-001",
4 Direction.IN,
5 "USDT",
6 "10.00"));

Use a unique partner-side order number for each transfer request. If a request times out, query the original order before creating a new one.

Next steps

NeedNext page
Issue a Trading Widget credentialCreate Embed Token
Verify callbacks from 6MMWebhooks & Idempotency
Review signing behaviorSecrets & Signing