Skip to navigation

Upgrade to v0.3.0

Upgrade to v0.3.0: Agent Java SDK v0.3.0 integration, examples, parameters and response semantics.

View as Markdown

This guide targets Agent Java SDK v0.3.0 and Java 8+.

Decide what needs upgrading

Existing integrationAction
Existing production functions with omitted environmentExisting response shapes remain compatible; the new queries do not force an upgrade.
Existing generic embed authentication for seconds tradingReuse authentication and renewal; select the required product page.
Funding balances, transfers and recoveryUse the models containing withFunding, walletTransfer and queryWalletTransfer.
Explicit simulated fundsUse request/response models supporting environment.
Six perpetual-data queriesUse public Java SDK v0.3.0, including the six methods and array-signing support.

Preserve your current baseUrl, agentCode, apiSecret, user bindings and original business orders.

Install the stable public tag

GitHub hosts source. Publishing a GitHub tag does not publish the Maven coordinates to Maven Central. Install the tagged source locally or publish its verified JAR/POM to your organization’s artifact repository.

git clone --branch v0.3.0 --single-branch https://github.com/6mm-com/agent-java-sdk.git agent-java-sdk-v0.3.0
cd agent-java-sdk-v0.3.0
git rev-parse HEAD
git rev-parse 'v0.3.0^{commit}'
mvn install

The two commit IDs must match. Declare the dependency in the partner project:

<dependency>
<groupId>com.sixmm.exchange.sdk</groupId>
<artifactId>agent</artifactId>
<version>0.3.0</version>
</dependency>

Verify the resolved dependency:

mvn dependency:tree -Dincludes=com.sixmm.exchange.sdk:agent

A local installation only makes the artifact available on that machine. CI and other developers need the same tagged installation or your verified artifact repository. If you already have a private artifact named 0.3.0, verify its source and methods; do not silently overwrite a shared artifact.

Required integration changes

  1. Update request and response models for explicit environment. Strict older response models may reject the additional field.
  2. Use withFunding() before reading funding. Contract balances are not seconds-trading balances.
  3. Use /v1/agent/wallet-transfer and /v1/agent/wallet-transfer-status for Funding. The old queryOrder cannot recover a Funding operation.
  4. The six queries use platformUserIds as a string array. Sign arrays as compact JSON; Java List.toString() is not compatible.
  5. Store transfer orders, ordinary trading orders, conditional orders and fills as distinct entities. Parse orderStatus or status according to the operation.
  6. Verify the original webhook body before parsing. Explicit simulated notifications include environment; compare it with the saved order.
  7. Manage Java and Widget versions independently. A backend upgrade does not change the frontend page or trading mode, and seconds trading does not require a new token type.

Verify the upgrade

Run the partner project’s build and inspect its dependency tree. Test binding, the original production flow, explicit simulated balances, Funding result recovery, all six queries, fixed-window pagination, error handling and idempotent callbacks.

For a custom HTTP client, follow the tagged request and signature contract instead of assuming the old models cover new fields. See Agent signing rules, Query overview and Environment guide.