> For the complete documentation index, see [llms.txt](https://docs.sigrex.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sigrex.io/api-reference/reference/api-keys/exchange-api-keys.md).

# Exchange API Keys

## GET /api/v2/api/exchange

> Get all exchange API keys for user

```json
{"openapi":"3.0.0","info":{"title":"Sigrex API","version":"2.1.0"},"tags":[{"name":"exchange-api-keys"}],"servers":[{"url":"https://api.sigrex.io"}],"security":[{"ApiKey":[],"Signature":[],"Timestamp":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"api-key","description":"Your public API key"}},"schemas":{}},"paths":{"/api/v2/api/exchange":{"get":{"summary":"Get all exchange API keys for user","tags":["exchange-api-keys"],"responses":{"200":{"description":"List of user's exchange API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExchangeApiKey"}}}}}}}}}}
```

## POST /api/v2/api/exchange

> Create a new exchange API key

```json
{"openapi":"3.0.0","info":{"title":"Sigrex API","version":"2.1.0"},"tags":[{"name":"exchange-api-keys"}],"servers":[{"url":"https://api.sigrex.io"}],"security":[{"ApiKey":[],"Signature":[],"Timestamp":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"api-key","description":"Your public API key"}},"schemas":{"CreateExchangeApiKeyRequest":{"type":"object","required":["exchangeId","publicKey","privateKey"],"properties":{"exchangeId":{"type":"number","description":"The id of a CEX exchange"},"name":{"type":"string","description":"The name of the API key max 255 characters"},"publicKey":{"type":"string"},"privateKey":{"type":"string"},"extra":{"type":"string","description":"Some extra value if required, depends on the exchange"}}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/api/v2/api/exchange":{"post":{"summary":"Create a new exchange API key","tags":["exchange-api-keys"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExchangeApiKeyRequest"}}}},"responses":{"201":{"description":"API key created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeApiKey"}}}},"400":{"description":"Missing required fields or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Exchange not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## GET /api/v2/api/exchange/bot/signal/{id}

> Get signal bots that use an API key

```json
{"openapi":"3.0.0","info":{"title":"Sigrex API","version":"2.1.0"},"tags":[{"name":"exchange-api-keys"}],"servers":[{"url":"https://api.sigrex.io"}],"security":[{"ApiKey":[],"Signature":[],"Timestamp":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"api-key","description":"Your public API key"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/api/v2/api/exchange/bot/signal/{id}":{"get":{"summary":"Get signal bots that use an API key","tags":["exchange-api-keys"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"query","name":"page","required":true,"schema":{"type":"integer"}},{"in":"query","name":"limit","required":true,"schema":{"type":"integer"},"description":"Page size, max 100 (larger values are capped to 100)"}],"responses":{"200":{"description":"Paginated signal bot data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignalBots"}}}},"400":{"description":"Missing id, page, or limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## PUT /api/v2/api/exchange/{id}/status

> Update API key status

```json
{"openapi":"3.0.0","info":{"title":"Sigrex API","version":"2.1.0"},"tags":[{"name":"exchange-api-keys"}],"servers":[{"url":"https://api.sigrex.io"}],"security":[{"ApiKey":[],"Signature":[],"Timestamp":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"api-key","description":"Your public API key"}},"schemas":{"UpdateStatusRequest":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["ACTIVE","INACTIVE"]}}},"SuccessResponse":{"type":"object","properties":{"message":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/api/v2/api/exchange/{id}/status":{"put":{"summary":"Update API key status","tags":["exchange-api-keys"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStatusRequest"}}}},"responses":{"200":{"description":"Status updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Missing id or invalid status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## DELETE /api/v2/api/exchange/{id}

> Delete an exchange API key

```json
{"openapi":"3.0.0","info":{"title":"Sigrex API","version":"2.1.0"},"tags":[{"name":"exchange-api-keys"}],"servers":[{"url":"https://api.sigrex.io"}],"security":[{"ApiKey":[],"Signature":[],"Timestamp":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"api-key","description":"Your public API key"}},"schemas":{"SuccessResponse":{"type":"object","properties":{"message":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/api/v2/api/exchange/{id}":{"delete":{"summary":"Delete an exchange API key","tags":["exchange-api-keys"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"API key deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Missing api id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"API key is in use by signal bots","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## POST /api/v2/api/exchange/test

> Test exchange API key credentials

```json
{"openapi":"3.0.0","info":{"title":"Sigrex API","version":"2.1.0"},"tags":[{"name":"exchange-api-keys"}],"servers":[{"url":"https://api.sigrex.io"}],"security":[{"ApiKey":[],"Signature":[],"Timestamp":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"api-key","description":"Your public API key"}},"schemas":{"TestApiKeyRequest":{"type":"object","required":["exchangeId","publicKey","privateKey"],"properties":{"exchangeId":{"type":"number","description":"The id of a CEX exchange"},"publicKey":{"type":"string"},"privateKey":{"type":"string"},"extra":{"type":"sting","description":"Some extra value if required, depends on the exchange"}}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/api/v2/api/exchange/test":{"post":{"summary":"Test exchange API key credentials","tags":["exchange-api-keys"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestApiKeyRequest"}}}},"responses":{"200":{"description":"API key is valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestResponse"}}}},"400":{"description":"Missing required fields or invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestResponse"}}}},"404":{"description":"Exchange not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sigrex.io/api-reference/reference/api-keys/exchange-api-keys.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
