---
updatedAt: 2025-02-14T22:18:03.000Z
agentTools:
  projectIndex: https://docs.alphagroup.com/llms.txt
---

# POST Book Spot Trade

Book a Spot trade using a QuoteID.

For full documentation please see  [Spot ](https://docs.alphagroup.com/docs/spot)section.

# OpenAPI definition

```json
{
  "x-generator": "NSwag v14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))",
  "openapi": "3.0.0",
  "info": {
    "title": "Alpha API",
    "version": "v2.0.194"
  },
  "servers": [
    {
      "url": "https://sandbox.api.alphagroup.com"
    }
  ],
  "paths": {
    "/v1/fx/trades/spot": {
      "post": {
        "tags": [
          "Fx"
        ],
        "summary": "POST Book Spot Trade",
        "operationId": "Fx_PostTrade",
        "requestBody": {
          "x-name": "request",
          "description": "A trade to be booked.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TradeRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Trade response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TradeResponse"
                }
              }
            }
          },
          "400": {
            "description": "There were errors in the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized."
          },
          "403": {
            "description": "Forbidden."
          },
          "404": {
            "description": "Resource not found."
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ProblemDetails": {
        "type": "object",
        "additionalProperties": {
          "nullable": true
        },
        "properties": {
          "Type": {
            "type": "string",
            "nullable": true
          },
          "Title": {
            "type": "string",
            "nullable": true
          },
          "Status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "Detail": {
            "type": "string",
            "nullable": true
          },
          "Instance": {
            "type": "string",
            "nullable": true
          },
          "Extensions": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "FixedSide": {
        "type": "string",
        "description": "",
        "x-enumNames": [
          "Buy",
          "Sell"
        ],
        "enum": [
          "Buy",
          "Sell"
        ]
      },
      "TradeResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "EntityId",
          "TradeId",
          "QuoteId",
          "BuyCurrency",
          "SellCurrency",
          "FixedSide",
          "OrderDateTime",
          "ValueDate",
          "BuyAmount",
          "SellAmount",
          "Rate",
          "CurrencyPair",
          "BuyAccountId",
          "SellAccountId",
          "BuyAccountIban",
          "SellAccountIban",
          "InverseRate",
          "InverseCurrencyPair"
        ],
        "properties": {
          "EntityId": {
            "type": "string",
            "description": "Entity ID.",
            "minLength": 1,
            "example": "26fea8c5-5f13-493c-b9a2-36e74e3c1d37"
          },
          "TradeId": {
            "type": "string",
            "description": "Trade ID.",
            "minLength": 1,
            "example": "AFX100001"
          },
          "QuoteId": {
            "type": "string",
            "description": "Quote ID.",
            "minLength": 1,
            "example": "f6e24f4f-bfc6-4247-99fb-7e8275c35e37"
          },
          "BuyCurrency": {
            "type": "string",
            "description": "The buy currency.",
            "maxLength": 3,
            "minLength": 3,
            "example": "USD"
          },
          "SellCurrency": {
            "type": "string",
            "description": "The sell currency.",
            "maxLength": 3,
            "minLength": 3,
            "example": "EUR"
          },
          "FixedSide": {
            "description": "The side in which you would like to fix the amount to. For example;\nby inputting 'Buy' this fixes the amount to the buy currency and the\namount you would like to buy will stay the same. By inputting 'Sell'\nthis fixes the amount to the sell currency and the amount you would\nlike to sell will stay the same.",
            "example": "Buy",
            "oneOf": [
              {
                "$ref": "#/components/schemas/FixedSide"
              }
            ]
          },
          "OrderDateTime": {
            "type": "string",
            "description": "The trade order date-time, i.e 2024-06-27T13:03:07+00:00.",
            "format": "date-time",
            "minLength": 1,
            "example": "2024-06-27T13:03:07+00:00"
          },
          "ValueDate": {
            "type": "string",
            "description": "The value date, i.e 2023-01-19.",
            "format": "date-time",
            "minLength": 1,
            "example": "2019-10-20"
          },
          "BuyAmount": {
            "type": "number",
            "description": "Buy amount in buy currency.",
            "format": "decimal"
          },
          "SellAmount": {
            "type": "number",
            "description": "Sell amount in sell currency.",
            "format": "decimal"
          },
          "Rate": {
            "type": "number",
            "description": "Conversion rate.",
            "format": "decimal"
          },
          "CurrencyPair": {
            "type": "string",
            "description": "Currency pair.",
            "minLength": 1
          },
          "BuyAccountId": {
            "type": "string",
            "description": "Buy account ID.",
            "minLength": 1,
            "example": "26fea8c5-5f13-493c-b9a2-36e74e3c1d37"
          },
          "SellAccountId": {
            "type": "string",
            "description": "Sell account ID.",
            "minLength": 1,
            "example": "cee4574e-0250-4574-b66f-6014d259902b"
          },
          "BuyAccountIban": {
            "type": "string",
            "description": "Buy account IBAN.",
            "minLength": 1
          },
          "SellAccountIban": {
            "type": "string",
            "description": "Sell account IBAN.",
            "minLength": 1
          },
          "InverseRate": {
            "type": "number",
            "description": "Inverse conversion rate.",
            "format": "decimal"
          },
          "InverseCurrencyPair": {
            "type": "string",
            "description": "Inverse currency pair.",
            "minLength": 1
          },
          "ClientReference": {
            "type": "string",
            "description": "Client trade reference.",
            "nullable": true
          },
          "UniqueTradeReference": {
            "type": "string",
            "description": "Unique trade reference used for deduplication and valid for 24 hours.",
            "nullable": true
          },
          "Type": {
            "description": "Trade type.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/TradeType"
              }
            ]
          },
          "Subtype": {
            "description": "Trade subtype.",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ForwardTradeSubtype"
              }
            ]
          },
          "AccessDate": {
            "type": "string",
            "description": "Date the forward can be drawdown from.",
            "format": "date",
            "nullable": true
          }
        }
      },
      "TradeType": {
        "type": "string",
        "description": "",
        "x-enumNames": [
          "Spot",
          "Forward"
        ],
        "enum": [
          "Spot",
          "Forward"
        ]
      },
      "ForwardTradeSubtype": {
        "type": "string",
        "description": "",
        "x-enumNames": [
          "Fixed",
          "Open",
          "Variable",
          "Window"
        ],
        "enum": [
          "Fixed",
          "Open",
          "Variable",
          "Window"
        ]
      },
      "TradeRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "QuoteId",
          "EntityId"
        ],
        "properties": {
          "QuoteId": {
            "type": "string",
            "description": "Quote ID.",
            "format": "guid",
            "minLength": 1
          },
          "ClientReference": {
            "type": "string",
            "description": "Client reference.",
            "nullable": true
          },
          "UniqueTradeReference": {
            "type": "string",
            "description": "Unique trade reference used for deduplication and valid for 24 hours",
            "nullable": true
          },
          "EntityId": {
            "type": "string",
            "description": "Entity ID.",
            "minLength": 1
          }
        }
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://sandbox.api.alphagroup.com/api/v1/oauth2/token",
            "scopes": {
              "preprod-api/payments": "Payments",
              "preprod-api/fx": "FX",
              "preprod-api/credit": "Credit",
              "preprod-api/reporting": "Reporting",
              "preprod-api/deposits": "Deposits"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ]
}
```