# Cancel a Settlement Request

## POST /settlements/{settlement\_id}/cancel

> Cancel a settlement by id.\
> Only Settlement with an outbound transaction in status \`FAILED\_TO\_BROADCAST\`\
> or \`SIGNED\` can be canceled.\
> Only Exchange (Liquidity Provider) user can cancel a settlement.<br>

```json
{"openapi":"3.0.2","info":{"title":"Vault API","version":"1.34.2-3-g8acda32"},"tags":[],"security":[{"Ledger_API_User":[]},{"Ledger_API_User":[],"Ledger_API_Key":[]},{"Ledger_API_User":[],"Ledger_Store_Auth_Token":[]},{"Ledger_API_User":[],"Ledger_API_Key":[],"Ledger_Store_Auth_Token":[]}],"components":{"securitySchemes":{"Ledger_API_User":{"description":"(**required**) Username of a registered API User","in":"header","name":"X-Ledger-API-User","type":"apiKey"}},"schemas":{"Settlement":{"additionalProperties":false,"properties":{"from_pledge_id":{"format":"uuid","type":"string"},"id":{"format":"uuid","type":"string"},"inbound_transaction_intent":{"allOf":[{"$ref":"#/components/schemas/InboundTransactionIntent"}],"default":null,"nullable":true},"meta":{"additionalProperties":{"nullable":true},"type":"object"},"outbound_transaction":{"allOf":[{"$ref":"#/components/schemas/OutboundTransaction"}],"default":null,"nullable":true},"repledge":{"allOf":[{"$ref":"#/components/schemas/RepledgeRequest"}],"default":null,"nullable":true},"repledge_intent":{"allOf":[{"$ref":"#/components/schemas/RepledgeIntent"}],"default":null,"nullable":true},"state":{"type":"string"}},"required":["from_pledge_id","id","meta","state"],"type":"object"},"InboundTransactionIntent":{"properties":{"amount":{"type":"integer"},"to_account_id":{"type":"integer"},"to_address":{"type":"string"}},"required":["amount","to_account_id","to_address"],"type":"object"},"OutboundTransaction":{"properties":{"request_id":{"type":"integer"},"transaction_hash":{"default":null,"nullable":true,"type":"string"},"transaction_id":{"type":"integer"}},"required":["request_id","transaction_id"],"type":"object"},"RepledgeRequest":{"properties":{"repledge_id":{"type":"integer"},"request_id":{"type":"integer"}},"required":["repledge_id","request_id"],"type":"object"},"RepledgeIntent":{"properties":{"account_name":{"type":"string"},"amount":{"type":"string"},"contract_address":{"default":null,"nullable":true,"type":"string"},"currency":{"type":"string"},"exchange_name":{"type":"string"},"pledge_subaccount_id":{"type":"integer"},"to_address":{"default":null,"nullable":true,"type":"string"},"transaction_hash":{"default":null,"nullable":true,"type":"string"}},"required":["account_name","amount","currency","exchange_name","pledge_subaccount_id"],"type":"object"},"Error":{"properties":{"message":{"type":"string"},"name":{"type":"string"},"status_code":{"type":"integer"}},"required":["message","name","status_code"],"type":"object"}}},"paths":{"/settlements/{settlement_id}/cancel":{"post":{"tags":["Settlements"],"description":"Cancel a settlement by id.\nOnly Settlement with an outbound transaction in status `FAILED_TO_BROADCAST`\nor `SIGNED` can be canceled.\nOnly Exchange (Liquidity Provider) user can cancel a settlement.\n","parameters":[{"name":"settlement_id","in":"path","description":"settlement's id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settlement"}}},"description":"settlement object"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Settlement cannot be canceled"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Settlement not found"}}}}}}
```


---

# 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://help.enterprise.ledger.com/api-documentation/reference/api-reference/settlements/cancel-a-settlement-request.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.
