Tools

SDKs

The official SDKs handle signing, requests, errors and webhook verification. All five behave identically and use only their language's standard library — no third-party dependencies.

Downloads

LanguageRequiresDownload
JavaScript / TypeScriptNode.js 18+speed-sdk-js-1.0.0.tgz
PythonPython 3.8+speed-sdk-python-1.0.0.zip
PHPPHP 7.4+ (curl, json)speed-sdk-php-1.0.0.zip
JavaJava 11+speed-sdk-java-1.0.0.zip
GoGo 1.20+speed-sdk-go-1.0.0.zip

Each package includes the full source, a README and examples. The shared SDK behavior spec is in SPEC.md.

Client options

OptionRequiredDescription
apiKeyYesAPI key
apiSecretYesSecret
baseUrlNoAPI host, default https://speed.cc
timeoutMsNoRequest timeout, default 20000 ms
langNoError message language: zh or en

Method reference

EndpointNode.js / PHP / JavaPythonGo
Currenciescurrencies()currencies()Currencies(ctx)
Quoterate(...)rate(...)Rate(ctx, RateRequest)
Create ordercreateOrder(...)create_order(...)CreateOrder(ctx, CreateOrderRequest)
Get ordergetOrder(orderNo)get_order(order_no)GetOrder(ctx, orderNo)
Get by your order IDgetOrderByClientId(id)get_order_by_client_id(id)GetOrderByClientID(ctx, id)
List orderslistOrders(...)list_orders(...)ListOrders(ctx, page, size)
Exception ordersorderAction(orderNo, ...)order_action(order_no, ...)OrderAction(ctx, orderNo, ActionRequest)
Webhook verificationverifyWebhook / Webhook::verify / Webhooks.verifyverify_webhookVerifyWebhook

Error handling

When a call fails, the SDK throws (Go returns) an error with code and message; network errors and timeouts have code -1.

const { SpeedApiError } = require('speed-sdk')
try {
  await speed.createOrder(params)
} catch (e) {
  if (e instanceof SpeedApiError) console.log(e.code, e.message)
}

Versioning

The SDKs follow semantic versioning. Patch and minor releases are backward compatible; breaking changes only come with a major version and are described in the Changelog.

Need help with your integration? Contact support: [email protected]