> For the complete documentation index, see [llms.txt](https://sodex.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sodex.com/documentation/for-developers/sdks/go-sdk-signing-guide.md).

# Go SDK Signing Guide

The official Go SDK focuses on constructing request payloads and generating SoDEX-compatible signatures.

GitHub: [sodex-go-sdk-public](https://github.com/sodex-tech/sodex-go-sdk-public)

## What the SDK Covers

* EIP-712 domain construction
* `payloadHash` generation
* signature-type prefixes
* spot and perps signer helpers

## What the SDK Does Not Cover

* HTTP clients
* WebSocket clients
* retries and reconnects
* rate-limit scheduling
* key storage

## Core Entry Points

* `common/signer/evm_signer.go`
* `spot/signer/signer.go`
* `perps/signer/signer.go`

Use the spot signer for the `spot` domain and the perps signer for the `futures` domain.

## Example

```go
package main

import (
	"crypto/ecdsa"
	"time"

	"github.com/shopspring/decimal"
	"github.com/sodex-tech/sodex-go-sdk-public/common/enums"
	spotSigner "github.com/sodex-tech/sodex-go-sdk-public/spot/signer"
	spotTypes "github.com/sodex-tech/sodex-go-sdk-public/spot/types"
)

func signSpotOrder(privateKey *ecdsa.PrivateKey) ([]byte, error) {
	signer := spotSigner.NewSigner(286623, privateKey)

	price := decimal.NewFromInt(100000)
	quantity := decimal.New(1, -2) // 0.01
	req := &spotTypes.BatchNewOrderRequest{
		AccountID: 1001,
		Orders: []*spotTypes.BatchNewOrderItem{{
			SymbolID:    1,
			ClOrdID:     "example-order-1",
			Side:        enums.OrderSideBuy,
			Type:        enums.OrderTypeLimit,
			TimeInForce: enums.TimeInForceGTC,
			Price:       &price,
			Quantity:    &quantity,
		}},
	}

	nonce := uint64(time.Now().UnixMilli())
	return signer.SignBatchNewOrderRequest(req, nonce)
}

```

## Notes

* The returned signature already includes the SoDEX signature-type prefix.
* The timestamp nonce is suitable for this single-call example. For repeated or concurrent requests, coordinate unique nonces per signing address as described in [API Keys and Nonces](/documentation/for-developers/developers/trading/api-keys-and-nonces.md#sodex-nonces).
* The SDK marshals the request payload before hashing, so your custom clients should avoid mutating field order or names when reimplementing signing outside the SDK.

## Related Pages

{% content-ref url="/pages/wASmnPymOV1uW5yFrcEF" %}
[Trading API](/documentation/for-developers/api-reference/trading-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/JhkOXmaIr0osLMjp2DfF" %}
[REST API](/documentation/for-developers/api-reference/trading-api/rest-v1.md)
{% endcontent-ref %}
