# 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"

	"github.com/sodex-tech/sodex-go-sdk-public/common/enums"
	commonTypes "github.com/sodex-tech/sodex-go-sdk-public/common/types"
	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)

	req := &spotTypes.NewOrderRequest{
		AccountID:   1001,
		SymbolID:    1,
		ClOrdID:     "example-order-1",
		Side:        enums.OrderSideBuy,
		Type:        enums.OrderTypeLimit,
		TimeInForce: enums.TimeInForceGTC,
		Price:       "100000",
		Quantity:    "0.01",
	}

	nonce := uint64(1760373925000)
	return signer.SignNewOrderRequest(req, nonce)
}

```

## Notes

* The returned signature already includes the SoDEX signature-type prefix.
* All nonces must still satisfy the gateway nonce rules.
* 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="broken-reference" %}
[Broken link](https://sodex.com/documentation/api/broken-reference)
{% endcontent-ref %}

{% content-ref url="rest-v1" %}
[rest-v1](https://sodex.com/documentation/api/rest-v1)
{% endcontent-ref %}
