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
| Language | Requires | Download |
|---|---|---|
| JavaScript / TypeScript | Node.js 18+ | speed-sdk-js-1.0.0.tgz |
| Python | Python 3.8+ | speed-sdk-python-1.0.0.zip |
| PHP | PHP 7.4+ (curl, json) | speed-sdk-php-1.0.0.zip |
| Java | Java 11+ | speed-sdk-java-1.0.0.zip |
| Go | Go 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
| Option | Required | Description |
|---|---|---|
apiKey | Yes | API key |
apiSecret | Yes | Secret |
baseUrl | No | API host, default https://speed.cc |
timeoutMs | No | Request timeout, default 20000 ms |
lang | No | Error message language: zh or en |
Method reference
| Endpoint | Node.js / PHP / Java | Python | Go |
|---|---|---|---|
| Currencies | currencies() | currencies() | Currencies(ctx) |
| Quote | rate(...) | rate(...) | Rate(ctx, RateRequest) |
| Create order | createOrder(...) | create_order(...) | CreateOrder(ctx, CreateOrderRequest) |
| Get order | getOrder(orderNo) | get_order(order_no) | GetOrder(ctx, orderNo) |
| Get by your order ID | getOrderByClientId(id) | get_order_by_client_id(id) | GetOrderByClientID(ctx, id) |
| List orders | listOrders(...) | list_orders(...) | ListOrders(ctx, page, size) |
| Exception orders | orderAction(orderNo, ...) | order_action(order_no, ...) | OrderAction(ctx, orderNo, ActionRequest) |
| Webhook verification | verifyWebhook / Webhook::verify / Webhooks.verify | verify_webhook | VerifyWebhook |
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)
}from speed_sdk import SpeedApiError
try:
speed.create_order(**params)
except SpeedApiError as e:
print(e.code, e.message)try {
$speed->createOrder($params);
} catch (\Speed\Sdk\SpeedApiException $e) {
echo $e->getCode(), ' ', $e->getMessage();
}try {
speed.createOrder(req);
} catch (SpeedApiException e) {
System.out.println(e.getCode() + " " + e.getMessage());
}order, err := client.CreateOrder(ctx, req)
var apiErr *speed.APIError
if errors.As(err, &apiErr) {
fmt.Println(apiErr.Code, apiErr.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]