{
    "type": "object",
    "properties": {
        "type": {
            "$ref": "https://raw.githubusercontent.com/acrylplatform/acryl-transactions/master/src/schemas/IExchangeTransaction.json#/definitions/TRANSACTION_TYPE.EXCHANGE"
        },
        "order1": {
            "$ref": "https://raw.githubusercontent.com/acrylplatform/acryl-transactions/master/src/schemas/IExchangeTransaction.json#/definitions/IOrder<string|number>"
        },
        "order2": {
            "$ref": "https://raw.githubusercontent.com/acrylplatform/acryl-transactions/master/src/schemas/IExchangeTransaction.json#/definitions/IOrder<string|number>"
        },
        "price": {
            "$ref": "https://raw.githubusercontent.com/acrylplatform/acryl-transactions/master/src/schemas/IExchangeTransaction.json#/definitions/LONG"
        },
        "amount": {
            "$ref": "https://raw.githubusercontent.com/acrylplatform/acryl-transactions/master/src/schemas/IExchangeTransaction.json#/definitions/LONG"
        },
        "buyMatcherFee": {
            "$ref": "https://raw.githubusercontent.com/acrylplatform/acryl-transactions/master/src/schemas/IExchangeTransaction.json#/definitions/LONG"
        },
        "sellMatcherFee": {
            "$ref": "https://raw.githubusercontent.com/acrylplatform/acryl-transactions/master/src/schemas/IExchangeTransaction.json#/definitions/LONG"
        },
        "timestamp": {
            "type": "number"
        },
        "fee": {
            "$ref": "https://raw.githubusercontent.com/acrylplatform/acryl-transactions/master/src/schemas/IExchangeTransaction.json#/definitions/LONG"
        },
        "version": {
            "type": "number"
        },
        "proofs": {
            "description": "ITransaction signatures",
            "minItems": 0,
            "maxItems": 8,
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "senderPublicKey": {
            "description": "Account public key. This account will pay fee and this account's script will be executed if exists",
            "type": "string"
        }
    },
    "required": [
        "amount",
        "buyMatcherFee",
        "fee",
        "order1",
        "order2",
        "price",
        "proofs",
        "sellMatcherFee",
        "senderPublicKey",
        "timestamp",
        "type",
        "version"
    ],
    "definitions": {
        "TRANSACTION_TYPE.EXCHANGE": {
            "type": "number",
            "enum": [
                7
            ]
        },
        "IOrder<string|number>": {
            "type": "object",
            "properties": {
                "version": {
                    "type": "number"
                },
                "orderType": {
                    "enum": [
                        "buy",
                        "sell"
                    ],
                    "type": "string"
                },
                "assetPair": {
                    "type": "object",
                    "properties": {
                        "amountAsset": {
                            "type": [
                                "null",
                                "string"
                            ]
                        },
                        "priceAsset": {
                            "type": [
                                "null",
                                "string"
                            ]
                        }
                    },
                    "required": [
                        "amountAsset",
                        "priceAsset"
                    ]
                },
                "price": {
                    "type": [
                        "string",
                        "number"
                    ]
                },
                "amount": {
                    "type": [
                        "string",
                        "number"
                    ]
                },
                "timestamp": {
                    "type": "number"
                },
                "expiration": {
                    "type": "number"
                },
                "matcherFee": {
                    "type": "number"
                },
                "matcherPublicKey": {
                    "type": "string"
                },
                "proofs": {
                    "description": "ITransaction signatures",
                    "minItems": 0,
                    "maxItems": 8,
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "senderPublicKey": {
                    "description": "Account public key. This account will pay fee and this account's script will be executed if exists",
                    "type": "string"
                }
            },
            "required": [
                "amount",
                "assetPair",
                "expiration",
                "matcherFee",
                "matcherPublicKey",
                "orderType",
                "price",
                "proofs",
                "senderPublicKey",
                "timestamp"
            ]
        },
        "LONG": {
            "type": [
                "number"
            ]
        }
    },
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "https://raw.githubusercontent.com/acrylplatform/acryl-transactions/master/src/schemas/IExchangeTransaction.json"
}
