> For the complete documentation index, see [llms.txt](https://axiology.gitbook.io/axiology-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://axiology.gitbook.io/axiology-docs/rest-api/otc-trades-fop.md).

# OTC Trades FOP

## Get FOP OTC trades

> Retrieve a list of Free of Payment Over the Counter Trades

```json
{"openapi":"3.1.0","info":{"title":"Axiology TSS Broker Node API","version":"0.0.1"},"paths":{"/otc-trades-fop":{"get":{"description":"Retrieve a list of Free of Payment Over the Counter Trades","operationId":"getOtcTradesFop","parameters":[{"name":"filter","required":false,"in":"query","style":"deepObject","explode":true,"schema":{"$ref":"#/components/schemas/FilterOtcTradeFopDto"}},{"name":"mode","required":false,"in":"query","description":"Strategy applied when filtering/searching on multiple fields","schema":{"$ref":"#/components/schemas/FilterMode"}},{"name":"pagination","required":false,"in":"query","style":"deepObject","explode":true,"schema":{"$ref":"#/components/schemas/PaginationRequestDto"}},{"name":"order","required":false,"in":"query","content":{"application/json":{"schema":{"type":"array","uniqueItems":true,"items":{"type":"object","oneOf":[{"properties":{"createdAt":{"type":"string","enum":["asc","desc"]}},"required":["createdAt"]},{"properties":{"status":{"type":"string","enum":["asc","desc"]}},"required":["status"]},{"properties":{"amount":{"type":"string","enum":["asc","desc"]}},"required":["amount"]}]}}}},"description":"Array of fields and directions to order. Supported fields: createdAt, status, amount"}],"responses":{"200":{"description":"Successfully retrieved a list of items.","content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/PaginationResponseDto"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OtcTradeFopDto"}}},"required":["pagination","items"]}}}}},"summary":"Get FOP OTC trades","tags":["OTC Trades FOP"]}}},"components":{"schemas":{"FilterOtcTradeFopDto":{"type":"object","properties":{"assetId":{"description":"Filter OTC Trades FOP by asset id","oneOf":[{"type":"array","items":{"description":"Unique UUIDs of an entity","format":"uuid","type":"string"},"minItems":1},{"description":"Unique UUID of an entity","format":"uuid","type":"string"}]},"status":{"description":"Filter OTC Trades FOP by status","oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/OtcTradeFopStatus"},"minItems":1},{"$ref":"#/components/schemas/OtcTradeFopStatus"}]},"initiatorAccountAddress":{"description":"Filter OTC Trades FOP by initiator account address","oneOf":[{"type":"array","items":{"description":"Account address","type":"string","format":"xrp-address","pattern":"r[0-9a-zA-Z]{24,34}"},"minItems":1},{"type":"string","description":"Partial account address"}]},"initiatorBrokerId":{"description":"Filter OTC Trades FOP by initiator broker id","oneOf":[{"type":"array","items":{"description":"Unique UUIDs of an entity","format":"uuid","type":"string"},"minItems":1},{"description":"Unique UUID of an entity","format":"uuid","type":"string"}]},"acceptorAccountAddress":{"description":"Filter OTC Trades FOP by acceptor account address","oneOf":[{"type":"array","items":{"description":"Account address","type":"string","format":"xrp-address","pattern":"r[0-9a-zA-Z]{24,34}"},"minItems":1},{"type":"string","description":"Partial account address"}]},"acceptorBrokerId":{"description":"Filter OTC Trades FOP by acceptor broker id","oneOf":[{"type":"array","items":{"description":"Unique UUIDs of an entity","format":"uuid","type":"string"},"minItems":1},{"description":"Unique UUID of an entity","format":"uuid","type":"string"}]}}},"OtcTradeFopStatus":{"type":"string","enum":["initiated","completed","cancelled","rejected"],"description":"Status of the trade"},"FilterMode":{"type":"string","enum":["and","or"]},"PaginationRequestDto":{"type":"object","properties":{"size":{"type":"number","minimum":1,"default":10},"page":{"type":"number","minimum":1,"default":1}}},"PaginationResponseDto":{"type":"object","properties":{"size":{"type":"number","minimum":1,"default":10},"page":{"type":"number","minimum":1,"default":1},"totalItems":{"type":"number","description":"Total items count"},"totalPages":{"type":"number","description":"Total pages count"}},"required":["totalItems","totalPages"]},"OtcTradeFopDto":{"type":"object","properties":{"createdAt":{"format":"date-time","type":"string","description":"Created date"},"updatedAt":{"format":"date-time","type":"string","description":"Updated date"},"id":{"type":"string","description":"OTC FOP Trade UUID identifier, unique in scope of this node","format":"uuid"},"status":{"description":"Status of the trade","allOf":[{"$ref":"#/components/schemas/OtcTradeFopStatus"}]},"assetId":{"type":"string","description":"Initiator asset id","format":"uuid"},"amount":{"format":"int64","description":"Initiator amount to send.\n\nScaled as `ExponentScaledDecimal`.","allOf":[{"$ref":"#/components/schemas/ExponentScaledDecimal"}]},"initiatorAccountAddress":{"type":"string","description":"Initiator account address","format":"xrp-address","pattern":"r[0-9a-zA-Z]{24,34}"},"initiatorBrokerId":{"type":"string","description":"Initiator broker id","format":"uuid"},"acceptorAccountAddress":{"type":"string","description":"Acceptor account address","format":"xrp-address","pattern":"r[0-9a-zA-Z]{24,34}"},"acceptorBrokerId":{"type":"string","description":"Acceptor broker id","format":"uuid"},"reason":{"description":"Reason for the trade","nullable":true,"allOf":[{"$ref":"#/components/schemas/OtcReason"}]},"tradedAt":{"format":"date-time","type":"string","description":"Trade date"}},"required":["createdAt","updatedAt","id","status","assetId","amount","initiatorAccountAddress","initiatorBrokerId","acceptorAccountAddress","acceptorBrokerId","reason","tradedAt"]},"ExponentScaledDecimal":{"type":"integer","format":"int64","description":"Decimal value encoded on the wire as an integer scaled by the asset's exponent: `encoded = real × 10^exponent`. E.g. for a bond denominated in EUR (exponent=2), a coupon payment of `123.45` is encoded as `12345`, and a nominal value of `1000.00` is encoded as `100000`."},"OtcReason":{"type":"string","enum":["internal","external","restriction","error","client-instruction"],"description":"Reason for the trade"}}}}
```

## Initiate FOP OTC trade

> Initiate a Free-of-Payment Over-The-Counter trade, between two accounts

```json
{"openapi":"3.1.0","info":{"title":"Axiology TSS Broker Node API","version":"0.0.1"},"paths":{"/otc-trades-fop":{"post":{"description":"Initiate a Free-of-Payment Over-The-Counter trade, between two accounts","operationId":"initiateOtcTradeFop","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateOtcTradeFopDto"}}}},"responses":{"201":{"description":"Initiated FOP OTC trade","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtcTradeFopDto"}}}}},"summary":"Initiate FOP OTC trade","tags":["OTC Trades FOP"]}}},"components":{"schemas":{"InitiateOtcTradeFopDto":{"type":"object","properties":{"initiatorAccountAddress":{"type":"string","description":"Initiator account address","format":"xrp-address","pattern":"r[0-9a-zA-Z]{24,34}"},"assetId":{"type":"string","description":"Initiator sending asset id","format":"uuid"},"amount":{"format":"int64","description":"Initiator sending asset amount.\n\nScaled as `ExponentScaledDecimal`.","allOf":[{"$ref":"#/components/schemas/ExponentScaledDecimal"}]},"acceptorAccountAddress":{"type":"string","description":"Accepter account address","format":"xrp-address","pattern":"r[0-9a-zA-Z]{24,34}"},"reason":{"description":"**Reason for initiating OTC FOP trade:**\n- `error` - initiate error correcting trade\n- `restriction` - initiate trade due to restriction\n\n_*Required for currency transactions*_","allOf":[{"$ref":"#/components/schemas/OtcReason"}]},"tradedAt":{"format":"date-time","type":"string","description":"Trade day in ISO 8601 format YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.SSSZ"}},"required":["initiatorAccountAddress","assetId","amount","acceptorAccountAddress","tradedAt"]},"ExponentScaledDecimal":{"type":"integer","format":"int64","description":"Decimal value encoded on the wire as an integer scaled by the asset's exponent: `encoded = real × 10^exponent`. E.g. for a bond denominated in EUR (exponent=2), a coupon payment of `123.45` is encoded as `12345`, and a nominal value of `1000.00` is encoded as `100000`."},"OtcReason":{"type":"string","enum":["internal","external","restriction","error","client-instruction"],"description":"Reason for the trade"},"OtcTradeFopDto":{"type":"object","properties":{"createdAt":{"format":"date-time","type":"string","description":"Created date"},"updatedAt":{"format":"date-time","type":"string","description":"Updated date"},"id":{"type":"string","description":"OTC FOP Trade UUID identifier, unique in scope of this node","format":"uuid"},"status":{"description":"Status of the trade","allOf":[{"$ref":"#/components/schemas/OtcTradeFopStatus"}]},"assetId":{"type":"string","description":"Initiator asset id","format":"uuid"},"amount":{"format":"int64","description":"Initiator amount to send.\n\nScaled as `ExponentScaledDecimal`.","allOf":[{"$ref":"#/components/schemas/ExponentScaledDecimal"}]},"initiatorAccountAddress":{"type":"string","description":"Initiator account address","format":"xrp-address","pattern":"r[0-9a-zA-Z]{24,34}"},"initiatorBrokerId":{"type":"string","description":"Initiator broker id","format":"uuid"},"acceptorAccountAddress":{"type":"string","description":"Acceptor account address","format":"xrp-address","pattern":"r[0-9a-zA-Z]{24,34}"},"acceptorBrokerId":{"type":"string","description":"Acceptor broker id","format":"uuid"},"reason":{"description":"Reason for the trade","nullable":true,"allOf":[{"$ref":"#/components/schemas/OtcReason"}]},"tradedAt":{"format":"date-time","type":"string","description":"Trade date"}},"required":["createdAt","updatedAt","id","status","assetId","amount","initiatorAccountAddress","initiatorBrokerId","acceptorAccountAddress","acceptorBrokerId","reason","tradedAt"]},"OtcTradeFopStatus":{"type":"string","enum":["initiated","completed","cancelled","rejected"],"description":"Status of the trade"}}}}
```

## Get FOP OTC trade

> Get Free of Payment Over the Counter trade by its unique identifier

```json
{"openapi":"3.1.0","info":{"title":"Axiology TSS Broker Node API","version":"0.0.1"},"paths":{"/otc-trades-fop/{otcTradeFopId}":{"get":{"description":"Get Free of Payment Over the Counter trade by its unique identifier","operationId":"getOtcTradeFop","parameters":[{"name":"otcTradeFopId","required":true,"in":"path","description":"OTC FOP Trade UUID identifier, unique in scope of this node","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Retrieve full information about a single Free of Payment Over the Counter Trade","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtcTradeFopDto"}}}}},"summary":"Get FOP OTC trade","tags":["OTC Trades FOP"]}}},"components":{"schemas":{"OtcTradeFopDto":{"type":"object","properties":{"createdAt":{"format":"date-time","type":"string","description":"Created date"},"updatedAt":{"format":"date-time","type":"string","description":"Updated date"},"id":{"type":"string","description":"OTC FOP Trade UUID identifier, unique in scope of this node","format":"uuid"},"status":{"description":"Status of the trade","allOf":[{"$ref":"#/components/schemas/OtcTradeFopStatus"}]},"assetId":{"type":"string","description":"Initiator asset id","format":"uuid"},"amount":{"format":"int64","description":"Initiator amount to send.\n\nScaled as `ExponentScaledDecimal`.","allOf":[{"$ref":"#/components/schemas/ExponentScaledDecimal"}]},"initiatorAccountAddress":{"type":"string","description":"Initiator account address","format":"xrp-address","pattern":"r[0-9a-zA-Z]{24,34}"},"initiatorBrokerId":{"type":"string","description":"Initiator broker id","format":"uuid"},"acceptorAccountAddress":{"type":"string","description":"Acceptor account address","format":"xrp-address","pattern":"r[0-9a-zA-Z]{24,34}"},"acceptorBrokerId":{"type":"string","description":"Acceptor broker id","format":"uuid"},"reason":{"description":"Reason for the trade","nullable":true,"allOf":[{"$ref":"#/components/schemas/OtcReason"}]},"tradedAt":{"format":"date-time","type":"string","description":"Trade date"}},"required":["createdAt","updatedAt","id","status","assetId","amount","initiatorAccountAddress","initiatorBrokerId","acceptorAccountAddress","acceptorBrokerId","reason","tradedAt"]},"OtcTradeFopStatus":{"type":"string","enum":["initiated","completed","cancelled","rejected"],"description":"Status of the trade"},"ExponentScaledDecimal":{"type":"integer","format":"int64","description":"Decimal value encoded on the wire as an integer scaled by the asset's exponent: `encoded = real × 10^exponent`. E.g. for a bond denominated in EUR (exponent=2), a coupon payment of `123.45` is encoded as `12345`, and a nominal value of `1000.00` is encoded as `100000`."},"OtcReason":{"type":"string","enum":["internal","external","restriction","error","client-instruction"],"description":"Reason for the trade"}}}}
```

## Change FOP OTC trade

> Accept/Cancel/Reject a Free-Of-Payment Over-The-Counter trade

```json
{"openapi":"3.1.0","info":{"title":"Axiology TSS Broker Node API","version":"0.0.1"},"paths":{"/otc-trades-fop/{otcTradeFopId}":{"patch":{"description":"Accept/Cancel/Reject a Free-Of-Payment Over-The-Counter trade","operationId":"updateOtcTradeFop","parameters":[{"name":"otcTradeFopId","required":true,"in":"path","description":"OTC FOP Trade UUID identifier, unique in scope of this node","schema":{"format":"uuid","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOtcTradeFopDto"}}}},"responses":{"200":{"description":"Changed FOP OTC trade","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OtcTradeFopDto"}}}}},"summary":"Change FOP OTC trade","tags":["OTC Trades FOP"]}}},"components":{"schemas":{"UpdateOtcTradeFopDto":{"type":"object","properties":{"status":{"description":"**OTC Trade FOP status:**\n- `completed` - (destination investor agent) complete `initiated` OTC FOP trade\n- `cancelled` - (source investor agent) cancel `initiated` OTC FOP trade\n- `rejected` - (destination investor agent) reject `initiated` OTC FOP trade","allOf":[{"$ref":"#/components/schemas/OtcTradeFopStatus"}]}},"required":["status"]},"OtcTradeFopStatus":{"type":"string","enum":["initiated","completed","cancelled","rejected"],"description":"Status of the trade"},"OtcTradeFopDto":{"type":"object","properties":{"createdAt":{"format":"date-time","type":"string","description":"Created date"},"updatedAt":{"format":"date-time","type":"string","description":"Updated date"},"id":{"type":"string","description":"OTC FOP Trade UUID identifier, unique in scope of this node","format":"uuid"},"status":{"description":"Status of the trade","allOf":[{"$ref":"#/components/schemas/OtcTradeFopStatus"}]},"assetId":{"type":"string","description":"Initiator asset id","format":"uuid"},"amount":{"format":"int64","description":"Initiator amount to send.\n\nScaled as `ExponentScaledDecimal`.","allOf":[{"$ref":"#/components/schemas/ExponentScaledDecimal"}]},"initiatorAccountAddress":{"type":"string","description":"Initiator account address","format":"xrp-address","pattern":"r[0-9a-zA-Z]{24,34}"},"initiatorBrokerId":{"type":"string","description":"Initiator broker id","format":"uuid"},"acceptorAccountAddress":{"type":"string","description":"Acceptor account address","format":"xrp-address","pattern":"r[0-9a-zA-Z]{24,34}"},"acceptorBrokerId":{"type":"string","description":"Acceptor broker id","format":"uuid"},"reason":{"description":"Reason for the trade","nullable":true,"allOf":[{"$ref":"#/components/schemas/OtcReason"}]},"tradedAt":{"format":"date-time","type":"string","description":"Trade date"}},"required":["createdAt","updatedAt","id","status","assetId","amount","initiatorAccountAddress","initiatorBrokerId","acceptorAccountAddress","acceptorBrokerId","reason","tradedAt"]},"ExponentScaledDecimal":{"type":"integer","format":"int64","description":"Decimal value encoded on the wire as an integer scaled by the asset's exponent: `encoded = real × 10^exponent`. E.g. for a bond denominated in EUR (exponent=2), a coupon payment of `123.45` is encoded as `12345`, and a nominal value of `1000.00` is encoded as `100000`."},"OtcReason":{"type":"string","enum":["internal","external","restriction","error","client-instruction"],"description":"Reason for the trade"}}}}
```


---

# 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 dynamically by asking a question.

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

```
GET https://axiology.gitbook.io/axiology-docs/rest-api/otc-trades-fop.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
