# Schemas

## The OrderStatusEnum object

```json
{"openapi":"3.0.1","info":{"title":"DigitalAssets","version":"1.0"},"components":{"schemas":{"OrderStatusEnum":{"title":"OrderStatusEnum","type":"string","enum":["RECEIVED","INVALID","PENDING","CANCELED","REJECTED","FILLED","CORRECTED","SETTLED"]}}}}
```

## The QuantityType object

```json
{"openapi":"3.0.1","info":{"title":"DigitalAssets","version":"1.0"},"components":{"schemas":{"QuantityType":{"type":"string","enum":["UNIT","AMOUNT"]}}}}
```

## The Quantity object

```json
{"openapi":"3.0.1","info":{"title":"DigitalAssets","version":"1.0"},"components":{"schemas":{"Quantity":{"type":"object","description":"","properties":{"unit":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"The quantity of a digital asset to buy or sell"},"amount":{"type":"number","minimum":0.01,"multipleOf":0.01,"description":"The cash value to buy or sell a digital asset. This amount is withdrawn in case  of a buy, and is deposited in case a sell."}},"required":["unit","amount"]}}}}
```

## The OrderData object

```json
{"openapi":"3.0.1","info":{"title":"DigitalAssets","version":"1.0"},"components":{"schemas":{"OrderData":{"title":"OrderData","type":"object","required":["cryptoSymbol","tradeSide","quantityType","quantity","externalId","walletCustomerProductId","cashCustomerProductId"],"properties":{"cryptoSymbol":{"type":"string"},"tradeSide":{"$ref":"#/components/schemas/TradeSideEnum"},"quantityType":{"$ref":"#/components/schemas/QuantityType"},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true},"externalId":{"type":"string","description":"External Id in partner's system. This value has to be unique"},"walletCustomerProductId":{"type":"string","format":"uuid","description":"Wallet customer product used for the order."},"cashCustomerProductId":{"type":"string","format":"uuid","description":"Cash customer product used for the order."}}},"TradeSideEnum":{"title":"TradeSideEnum","type":"string","enum":["BUY","SELL"]},"QuantityType":{"type":"string","enum":["UNIT","AMOUNT"]}}}}
```

## The CreateOrderResult object

```json
{"openapi":"3.0.1","info":{"title":"DigitalAssets","version":"1.0"},"components":{"schemas":{"CreateOrderResult":{"title":"CreateOrderResult","type":"object","required":["orderId","createdOn"],"properties":{"orderId":{"type":"string","format":"uuid"},"createdOn":{"type":"string","format":"date-time","description":"The date denoting when the order's record was initially created."}}}}}}
```

## The DigitalAssetsMarketOrderData object

```json
{"openapi":"3.0.1","info":{"title":"DigitalAssets","version":"1.0"},"components":{"schemas":{"DigitalAssetsMarketOrderData":{"title":"DigitalAssetsMarketOrderData","type":"object","properties":{"symbol":{"type":"string"},"assetType":{"$ref":"#/components/schemas/DigitalAssetTypeEnum"},"quantityType":{"$ref":"#/components/schemas/QuantityType"},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["symbol","assetType","quantityType","quantity"]},"DigitalAssetTypeEnum":{"title":"DigitalAssetTypeEnum","type":"string","description":"Digital Asset Type","enum":["CRYPTOCURRENCY","SECURITYTOKEN"]},"QuantityType":{"type":"string","enum":["UNIT","AMOUNT"]}}}}
```

## The DigitalAssetsOrderExecutionData object

```json
{"openapi":"3.0.1","info":{"title":"DigitalAssets","version":"1.0"},"components":{"schemas":{"DigitalAssetsOrderExecutionData":{"title":"DigitalAssetsOrderExecutionData","type":"object","properties":{"quantity":{"type":"number","minimum":0},"executionPrice":{"description":"The execution price refers to the actual price at which a trade or transaction was executed.","type":"number","minimum":0},"executionAmount":{"description":"The execution amount refers to the total cash amount of a trade. It represents for how much money a particular asset is bought or sold at the execution price when the order is fulfilled.","type":"number","minimum":0},"feeDescription":{"description":"A description of the fee associated with the order execution.","type":"string"},"feeAmount":{"description":"The fee amount charged for the order execution.","type":"number","minimum":0}},"required":["quantity","executionPrice","executionAmount"]}}}}
```

## The DigitalAssetsOrder object

```json
{"openapi":"3.0.1","info":{"title":"DigitalAssets","version":"1.0"},"components":{"schemas":{"DigitalAssetsOrder":{"title":"DigitalAssetsOrder","type":"object","properties":{"status":{"$ref":"#/components/schemas/OrderStatusEnum"},"side":{"$ref":"#/components/schemas/TradeSideEnum"},"orderId":{"type":"string","format":"uuid","description":"The identifier of the order."},"walletCustomerProductId":{"type":"string","format":"uuid","description":"The identifier of the wallet customer product."},"message":{"type":"string"},"createdOn":{"type":"string","format":"date-time","description":"The timestamp when the order was received."},"modifiedOn":{"type":"string","format":"date-time","readOnly":true,"description":"The timestamp when the order has changed the status."},"externalId":{"type":"string","description":"External Id in partner's system. This value has to be unique"},"orderType":{"$ref":"#/components/schemas/OrderTypeEnum"},"marketOrderData":{"$ref":"#/components/schemas/DigitalAssetsMarketOrderData"},"executionData":{"$ref":"#/components/schemas/DigitalAssetsOrderExecutionData"},"cashCustomerProductId":{"type":"string","format":"uuid","description":"Cash customer product used for the order."}},"required":["orderId","createdOn","modifiedOn","status","walletCustomerProductId","externalId","orderType","side","cashCustomerProductId"]},"OrderStatusEnum":{"title":"OrderStatusEnum","type":"string","enum":["RECEIVED","INVALID","PENDING","CANCELED","REJECTED","FILLED","CORRECTED","SETTLED"]},"TradeSideEnum":{"title":"TradeSideEnum","type":"string","enum":["BUY","SELL"]},"OrderTypeEnum":{"title":"OrderTypeEnum","type":"string","enum":["MARKET"]},"DigitalAssetsMarketOrderData":{"title":"DigitalAssetsMarketOrderData","type":"object","properties":{"symbol":{"type":"string"},"assetType":{"$ref":"#/components/schemas/DigitalAssetTypeEnum"},"quantityType":{"$ref":"#/components/schemas/QuantityType"},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["symbol","assetType","quantityType","quantity"]},"DigitalAssetTypeEnum":{"title":"DigitalAssetTypeEnum","type":"string","description":"Digital Asset Type","enum":["CRYPTOCURRENCY","SECURITYTOKEN"]},"QuantityType":{"type":"string","enum":["UNIT","AMOUNT"]},"DigitalAssetsOrderExecutionData":{"title":"DigitalAssetsOrderExecutionData","type":"object","properties":{"quantity":{"type":"number","minimum":0},"executionPrice":{"description":"The execution price refers to the actual price at which a trade or transaction was executed.","type":"number","minimum":0},"executionAmount":{"description":"The execution amount refers to the total cash amount of a trade. It represents for how much money a particular asset is bought or sold at the execution price when the order is fulfilled.","type":"number","minimum":0},"feeDescription":{"description":"A description of the fee associated with the order execution.","type":"string"},"feeAmount":{"description":"The fee amount charged for the order execution.","type":"number","minimum":0}},"required":["quantity","executionPrice","executionAmount"]}}}}
```

## The DigitalAssetsOrders object

```json
{"openapi":"3.0.1","info":{"title":"DigitalAssets","version":"1.0"},"components":{"schemas":{"DigitalAssetsOrders":{"title":"Orders","type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DigitalAssetsOrder"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"DigitalAssetsOrder":{"title":"DigitalAssetsOrder","type":"object","properties":{"status":{"$ref":"#/components/schemas/OrderStatusEnum"},"side":{"$ref":"#/components/schemas/TradeSideEnum"},"orderId":{"type":"string","format":"uuid","description":"The identifier of the order."},"walletCustomerProductId":{"type":"string","format":"uuid","description":"The identifier of the wallet customer product."},"message":{"type":"string"},"createdOn":{"type":"string","format":"date-time","description":"The timestamp when the order was received."},"modifiedOn":{"type":"string","format":"date-time","readOnly":true,"description":"The timestamp when the order has changed the status."},"externalId":{"type":"string","description":"External Id in partner's system. This value has to be unique"},"orderType":{"$ref":"#/components/schemas/OrderTypeEnum"},"marketOrderData":{"$ref":"#/components/schemas/DigitalAssetsMarketOrderData"},"executionData":{"$ref":"#/components/schemas/DigitalAssetsOrderExecutionData"},"cashCustomerProductId":{"type":"string","format":"uuid","description":"Cash customer product used for the order."}},"required":["orderId","createdOn","modifiedOn","status","walletCustomerProductId","externalId","orderType","side","cashCustomerProductId"]},"OrderStatusEnum":{"title":"OrderStatusEnum","type":"string","enum":["RECEIVED","INVALID","PENDING","CANCELED","REJECTED","FILLED","CORRECTED","SETTLED"]},"TradeSideEnum":{"title":"TradeSideEnum","type":"string","enum":["BUY","SELL"]},"OrderTypeEnum":{"title":"OrderTypeEnum","type":"string","enum":["MARKET"]},"DigitalAssetsMarketOrderData":{"title":"DigitalAssetsMarketOrderData","type":"object","properties":{"symbol":{"type":"string"},"assetType":{"$ref":"#/components/schemas/DigitalAssetTypeEnum"},"quantityType":{"$ref":"#/components/schemas/QuantityType"},"quantity":{"type":"number","minimum":0,"exclusiveMinimum":true}},"required":["symbol","assetType","quantityType","quantity"]},"DigitalAssetTypeEnum":{"title":"DigitalAssetTypeEnum","type":"string","description":"Digital Asset Type","enum":["CRYPTOCURRENCY","SECURITYTOKEN"]},"QuantityType":{"type":"string","enum":["UNIT","AMOUNT"]},"DigitalAssetsOrderExecutionData":{"title":"DigitalAssetsOrderExecutionData","type":"object","properties":{"quantity":{"type":"number","minimum":0},"executionPrice":{"description":"The execution price refers to the actual price at which a trade or transaction was executed.","type":"number","minimum":0},"executionAmount":{"description":"The execution amount refers to the total cash amount of a trade. It represents for how much money a particular asset is bought or sold at the execution price when the order is fulfilled.","type":"number","minimum":0},"feeDescription":{"description":"A description of the fee associated with the order execution.","type":"string"},"feeAmount":{"description":"The fee amount charged for the order execution.","type":"number","minimum":0}},"required":["quantity","executionPrice","executionAmount"]},"Pagination":{"title":"Pagination","type":"object","properties":{"cursor":{"type":"string","description":"String value used for pagination, which should be set in next page request."},"limit":{"type":"integer","description":"Maximum number of returned items"}},"required":["cursor","limit"]}}}}
```

## The OrderTypeEnum object

```json
{"openapi":"3.0.1","info":{"title":"DigitalAssets","version":"1.0"},"components":{"schemas":{"OrderTypeEnum":{"title":"OrderTypeEnum","type":"string","enum":["MARKET"]}}}}
```

## The DigitalAssetSymbolDefinition object

```json
{"openapi":"3.0.1","info":{"title":"DigitalAssets","version":"1.0"},"components":{"schemas":{"DigitalAssetSymbolDefinition":{"title":"DigitalAssetSymbolDefinition","type":"object","description":"`availableTo` field describes when the symbol support will be terminated. \nIf it points to some date in past it means the symbol is no longer supported.\n","properties":{"symbol":{"type":"string"},"description":{"type":"string"},"assetType":{"$ref":"#/components/schemas/DigitalAssetTypeEnum"},"decimalPlaces":{"type":"integer","minimum":0},"availableFrom":{"type":"string","format":"date-time"},"availableTo":{"type":"string","format":"date-time"},"assetRiskScore":{"$ref":"#/components/schemas/AssetRiskScoreEnum"}},"required":["symbol","description","assetType","decimalPlaces","availableFrom","assetRiskScore"]},"DigitalAssetTypeEnum":{"title":"DigitalAssetTypeEnum","type":"string","description":"Digital Asset Type","enum":["CRYPTOCURRENCY","SECURITYTOKEN"]},"AssetRiskScoreEnum":{"title":"AssetRiskScoreEnum","description":"The risk classification of the asset","enum":["0","3"]}}}}
```

## The DigitalAssetSymbolDefinitions object

```json
{"openapi":"3.0.1","info":{"title":"DigitalAssets","version":"1.0"},"components":{"schemas":{"DigitalAssetSymbolDefinitions":{"title":"DigitalAssetSymbolDefinitions","type":"object","properties":{"data":{"type":"array","description":"Array of digital asset symbol definitions.","items":{"$ref":"#/components/schemas/DigitalAssetSymbolDefinition"}}}},"DigitalAssetSymbolDefinition":{"title":"DigitalAssetSymbolDefinition","type":"object","description":"`availableTo` field describes when the symbol support will be terminated. \nIf it points to some date in past it means the symbol is no longer supported.\n","properties":{"symbol":{"type":"string"},"description":{"type":"string"},"assetType":{"$ref":"#/components/schemas/DigitalAssetTypeEnum"},"decimalPlaces":{"type":"integer","minimum":0},"availableFrom":{"type":"string","format":"date-time"},"availableTo":{"type":"string","format":"date-time"},"assetRiskScore":{"$ref":"#/components/schemas/AssetRiskScoreEnum"}},"required":["symbol","description","assetType","decimalPlaces","availableFrom","assetRiskScore"]},"DigitalAssetTypeEnum":{"title":"DigitalAssetTypeEnum","type":"string","description":"Digital Asset Type","enum":["CRYPTOCURRENCY","SECURITYTOKEN"]},"AssetRiskScoreEnum":{"title":"AssetRiskScoreEnum","description":"The risk classification of the asset","enum":["0","3"]}}}}
```
