# Transfers

Asset transfers from trading to consumption accounts. Transfers are one-way.

## Transfer to consumption

> Transfers a specified quantity of an instrument from trading account to consumption account.<br>

```json
{"openapi":"3.0.3","info":{"title":"Trading API","version":"1.0.0"},"tags":[{"name":"Transfers","description":"Asset transfers from trading to consumption accounts. Transfers are one-way.\n"}],"servers":[{"url":"{BASE_URL}/v1","description":"GRID Trading API Base URL\n","variables":{"BASE_URL":{"default":"https://trading.api.thegrid.ai","description":"The base URL for the API.\n"}}}],"security":[{"signatureAuth":[]}],"components":{"securitySchemes":{"signatureAuth":{"type":"apiKey","in":"header","name":"x-thegrid-signature","description":"Ed25519 signature authentication. **All three headers are required** for every request:\n\n| Header | Description |\n|--------|-------------|\n| `x-thegrid-signature` | Base64-encoded Ed25519 signature of `{timestamp}{METHOD}{path}{body}`\n| `x-thegrid-timestamp` | Unix timestamp in seconds (must be within 30 seconds of server time) |\n| `x-thegrid-fingerprint` | SHA256 hash of your public key (Base64-encoded, padding stripped) |\n\n[See full authentication docs](./overview-trading-api/authentication)\n"}},"schemas":{"TransferRequest":{"type":"object","required":["instrument_id","quantity"],"properties":{"instrument_id":{"type":"string","description":"The instrument to transfer from your trading account to your consumption account\n"},"quantity":{"type":"integer","minimum":1,"description":"Number of units to transfer. Must have sufficient available balance in your trading account.\n"}}},"TransferResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"transfer_id":{"type":"string"}}}}},"paths":{"/transfers/trading-to-consumption":{"post":{"tags":["Transfers"],"summary":"Transfer to consumption","description":"Transfers a specified quantity of an instrument from trading account to consumption account.\n","operationId":"transferToConsumption","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferRequest"}}}},"responses":{"202":{"description":"Transfer initiated (processed asynchronously)\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferResponse"}}}}}}}}}
```

## List transfer history

> Returns transfer histories for authenticated user.<br>

```json
{"openapi":"3.0.3","info":{"title":"Trading API","version":"1.0.0"},"tags":[{"name":"Transfers","description":"Asset transfers from trading to consumption accounts. Transfers are one-way.\n"}],"servers":[{"url":"{BASE_URL}/v1","description":"GRID Trading API Base URL\n","variables":{"BASE_URL":{"default":"https://trading.api.thegrid.ai","description":"The base URL for the API.\n"}}}],"security":[{"signatureAuth":[]}],"components":{"securitySchemes":{"signatureAuth":{"type":"apiKey","in":"header","name":"x-thegrid-signature","description":"Ed25519 signature authentication. **All three headers are required** for every request:\n\n| Header | Description |\n|--------|-------------|\n| `x-thegrid-signature` | Base64-encoded Ed25519 signature of `{timestamp}{METHOD}{path}{body}`\n| `x-thegrid-timestamp` | Unix timestamp in seconds (must be within 30 seconds of server time) |\n| `x-thegrid-fingerprint` | SHA256 hash of your public key (Base64-encoded, padding stripped) |\n\n[See full authentication docs](./overview-trading-api/authentication)\n"}},"parameters":{"next":{"name":"next","in":"query","schema":{"type":"string"},"description":"Cursor for forward pagination. Pass the `next_cursor` value from a previous response to fetch the next page. Mutually exclusive with `prev`.\n"},"prev":{"name":"prev","in":"query","schema":{"type":"string"},"description":"Cursor for backward pagination. Pass the `prev_cursor` value from a previous response to fetch the previous page. Mutually exclusive with `next`.\n"},"limit":{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":100},"description":"Number of items to return per page (max: 100)\n"}},"schemas":{"TransferHistoryResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TransferHistory"}},"paging":{"$ref":"#/components/schemas/CursorPaging"}}},"TransferHistory":{"type":"object","properties":{"transfer_id":{"type":"string"},"account_id":{"type":"string"},"sender_account_id":{"type":"string"},"instrument_id":{"type":"string"},"instrument_name":{"type":"string"},"market_id":{"type":"string"},"quantity":{"type":"integer"},"transferred_at":{"type":"string","format":"date-time"},"inserted_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"CursorPaging":{"type":"object","description":"Cursor-based pagination\n","properties":{"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true},"prev_cursor":{"type":"string","nullable":true}}}}},"paths":{"/transfer-histories":{"get":{"tags":["Transfers"],"summary":"List transfer history","description":"Returns transfer histories for authenticated user.\n","operationId":"listTransferHistory","parameters":[{"name":"market_id","in":"query","schema":{"type":"string"},"description":"Filter by market ID"},{"name":"instrument_id","in":"query","schema":{"type":"string"},"description":"Filter by instrument ID"},{"name":"start_datetime","in":"query","schema":{"type":"string","format":"date-time"},"description":"Filter transfers at or after this time (ISO8601 or Unix timestamp)"},{"name":"end_datetime","in":"query","schema":{"type":"string","format":"date-time"},"description":"Filter transfers at or before this time (ISO8601 or Unix timestamp)"},{"name":"order_by","in":"query","schema":{"type":"string","enum":["transferred_at","quantity"]},"description":"Field to sort by"},{"name":"order_direction","in":"query","schema":{"type":"string","enum":["asc","desc"],"default":"asc"},"description":"Sort direction"},{"$ref":"#/components/parameters/next"},{"$ref":"#/components/parameters/prev"},{"$ref":"#/components/parameters/limit"}],"responses":{"200":{"description":"Transfer history\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferHistoryResponse"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://thegrid.ai/docs/beta-trading-api/transfers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
