Java Quick Start

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

Install

The public SDK source currently documents tag v0.1.1 with these Maven coordinates:

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

GitHub does not act as a Maven dependency repository. Install the tagged source locally before resolving the dependency:

$git clone https://github.com/6mm-com/agent-java-sdk.git
$cd agent-java-sdk
$git checkout v0.1.1
$mvn install

Team builds

Publish the approved artifact to your organization’s Maven repository for CI, testing, and production builds. Confirm the approved version with 6MM before production deployment.

Source code and usage examples are available in the official Java SDK repository:

6mm-com/agent-java-sdk

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

1import com.sixmm.agent.AgentClient;
2import com.sixmm.agent.AgentClientConfig;
3
4AgentClient client = new AgentClient(AgentClientConfig.builder()
5 .baseUrl("https://agent-api.6mm.com")
6 .agentCode("AGENT001")
7 .apiSecret("your-api-secret")
8 .defaultCurrency("USDT")
9 .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
Diagnose an integration problemSDK Troubleshooting