Upgrade to v0.3.0
Upgrade to v0.3.0: Agent Java SDK v0.3.0 integration, examples, parameters and response semantics.
This guide targets Agent Java SDK v0.3.0 and Java 8+.
Decide what needs upgrading
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.
The two commit IDs must match. Declare the dependency in the partner project:
Verify the resolved dependency:
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
- Update request and response models for explicit
environment. Strict older response models may reject the additional field. - Use
withFunding()before readingfunding. Contract balances are not seconds-trading balances. - Use
/v1/agent/wallet-transferand/v1/agent/wallet-transfer-statusfor Funding. The oldqueryOrdercannot recover a Funding operation. - The six queries use
platformUserIdsas a string array. Sign arrays as compact JSON; JavaList.toString()is not compatible. - Store transfer orders, ordinary trading orders, conditional orders and fills as distinct entities. Parse
orderStatusorstatusaccording to the operation. - Verify the original webhook body before parsing. Explicit simulated notifications include
environment; compare it with the saved order. - 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.