Danske Bank (UK) FX Trade Report API

Premium first-party API providing access to open and historical FX trade reports with date-range filtering, counterpart filtering, and pagination, published on the Danske Bank developer portal with a public mock sandbox.

OpenAPI Specification

danske-bank-uk-fx-trade-report-openapi.json Raw ↑
{"openapi":"3.0.1","info":{"title":"FX Trade Report API","description":"This API provides access to open and historical FX trade reports.\n\n**Historical Trade Reports** - can be viewed by providing a specific date range via the `dateFrom` and `dateTo` parameters.\n\n**Filtering** - result set can be reduced by providing a filter parameter `counterparts`.\n\n**Pagination** - the API also supports pagination, allowing users to retrieve a specific number of records per page - `offset` and `limit` parameters.","version":"1.0.0","x-db-template-version":"1.0.0"},"tags":[{"name":"FX Trade Report","description":"Trade Report for Premium API users"},{"name":"SPI-SHFD","description":"SPI Code of the project."},{"name":"isDomainAPI-true","description":"API is identified as domain API."},{"name":"domain-Financial Markets","description":"The API is a part of the Financial Markets domain."},{"name":"subdomain-Trading","description":"The API is a part of the Trading subdomain."}],"paths":{"/trade-reports/trade/{tradeId}":{"get":{"tags":["FX Trade Report"],"summary":"Gets trade details by ID","description":"Provides trade information for a specific trade based on provided trade ID","operationId":"getTrade","parameters":[{"name":"tradeId","in":"path","description":"Unique identifier for the executed trade.","required":true,"schema":{"type":"string"},"example":"TRADE123456"}],"responses":{"200":{"description":"Trade details found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalTrade"},"examples":{"example1":{"summary":"Success response","value":{"tradeId":"T250711A8787","tradeTime":"2025-10-10T06:53:28.541Z","counterpart":"DEMOCP1","counterpartName":"DEMOCP","maturityDate":"2025-10-10","bought":{"currency":"DKK","amount":7.46},"sold":{"currency":"EUR","amount":1},"product":"Forward","spotPrice":7.46372,"forwardPrice":-0.0066376,"allInPrice":7.4570824,"autoSettle":true,"comment":"Urgent client request"}},"example2":{"summary":"Success response 2","value":{"tradeId":"W250429A1139","tradeTime":"2025-04-29T13:57:59.523Z","counterpart":"DBDEMO1","counterpartName":"DANSKE BANK DEMOAA","maturityDate":"2025-05-23","bought":{"currency":"DKK","amount":7.46},"sold":{"currency":"EUR","amount":1},"product":"FWD","spotPrice":7.46372,"forwardPrice":-0.0066376,"allInPrice":7.4570824,"autoSettle":true,"comment":"The transaction is successful"}}}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/TradeError"}},"example":{"exception":"BadRequest","message":"Invalid tradeId format.","timestamp":"2025-10-07T10:30:00Z"}}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/TradeError"}},"example":{"exception":"AuthenticationException","message":"Session token validation failed: No key found in https://issuer.danskenet.net/.well-known/jwks.json with kid 6BBDAAA362B8C700FD2FF24BE979697DE0A58F5D.","timestamp":"2025-10-10T06:49:23.712321Z"}}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/TradeError"}},"example":{"exception":"Forbidden","message":"You do not have permission to access this resource.","timestamp":"2025-10-07T10:30:00Z"}}}}},"404":{"description":"Trade details not found","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/TradeError"}},"example":{"exception":"NotFound","message":"Trade details not found for the given tradeId.","timestamp":"2025-10-07T10:30:00Z"}}}}},"413":{"description":"Payload Too Large","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/TradeError"}},"example":{"exception":"PayloadTooLarge","message":"Request payload too large.","timestamp":"2025-10-07T10:30:00Z"}}}}},"500":{"description":"Error while fetching Trade details","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/TradeError"}},"example":{"exception":"ServerError","message":"An unexpected error occurred while fetching trade details.","timestamp":"2025-10-07T10:30:00Z"}}}}}}}},"/trade-reports/open":{"get":{"tags":["FX Trade Report"],"summary":"Gets all Open Trades for a given district user ID, based on maturity date.","description":"Retrieves all Open Trades for a provided district user ID, optionally filtered by counterparts. Results are based on maturity/settlement date.<br>Pagination is supported with 'offset' defining the starting point and 'limit' specifying the number of records per page.<br>The response includes links for previous and next pages.","operationId":"getOpenTrades","parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0},"description":"Starting point of the records to retrieve (pagination).","example":0},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":30},"description":"Number of records to retrieve per page (pagination).","example":30},{"name":"counterparts","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"List of counterpart IDs to filter the trades.","example":["CP123","CP456"]}}],"responses":{"200":{"description":"List of Open Trades for the user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedListExternalTrade"},"examples":{"example1":{"summary":"Success response","value":{"items":[{"tradeId":"T250711A8787","tradeTime":"2025-10-10T06:44:22.702Z","counterpart":"DEMOCP1","counterpartName":"DEMOCP","maturityDate":"2025-10-10","bought":{"currency":"DKK","amount":7.46},"sold":{"currency":"EUR","amount":1},"product":"Forward","spotPrice":7.46372,"forwardPrice":-0.0066376,"allInPrice":7.4570824,"autoSettle":true,"comment":"Urgent client request"}],"next":"https://api.example.com/trade-reports?startDate=2025-05-20&endDate=2025-05-30&offset=5&limit=5","previous":"https://api.example.com/trade-reports?startDate=2025-05-20&endDate=2025-05-30&offset=4&limit=5"}},"example2":{"summary":"Success response 2","value":{"items":[{"tradeId":"W250429A1139","tradeTime":"2025-04-29T13:57:59.523Z","counterpart":"DBDEMO1","counterpartName":"DANSKE BANK DEMOAA","maturityDate":"2025-05-23","bought":{"currency":"DKK","amount":7.46},"sold":{"currency":"EUR","amount":1},"product":"FWD","spotPrice":7.46372,"forwardPrice":-0.0066376,"allInPrice":7.4570824,"autoSettle":true,"comment":"Successful retrieval of open trades."}],"next":"https://api.example.com/trade-reports?startDate=2025-05-20&endDate=2025-05-30&offset=5&limit=5","previous":"https://api.example.com/trade-reports?startDate=2025-05-20&endDate=2025-05-30&offset=4&limit=5"}}}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/TradeError"}},"example":{"exception":"BadRequest","message":"The limit parameter must be a positive integer.","timestamp":"2025-10-07T10:30:00Z"}}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/TradeError"}},"example":{"exception":"AuthenticationException","message":"Session token validation failed: No key found in https://issuer.danskenet.net/.well-known/jwks.json with kid 6BBDAAA362B8C700FD2FF24BE979697DE0A58F5D.","timestamp":"2025-10-10T06:49:23.712321Z"}}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/TradeError"}},"example":{"exception":"Forbidden","message":"You do not have permission to access this resource.","timestamp":"2025-10-07T10:30:00Z"}}}}},"404":{"description":"No Open Trades found for the user","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/TradeError"}},"example":{"exception":"NotFound","message":"No open trades found for the given parameters.","timestamp":"2025-10-07T10:30:00Z"}}}}},"413":{"description":"Response Payload too large","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/TradeError"}},"example":{"exception":"PayloadTooLarge","message":"Request payload too large.","timestamp":"2025-10-07T10:30:00Z"}}}}},"500":{"description":"Error while fetching user details","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/TradeError"}},"example":{"exception":"ServerError","message":"An unexpected error occurred while fetching open trades.","timestamp":"2025-10-07T10:30:00Z"}}}}}}}},"/trade-reports":{"get":{"tags":["FX Trade Report"],"summary":"Retrieves historical trades for a given district user ID within a date range, based on trade execution date.","description":"Retrieves Historical Trades for a provided district user ID within a given date range, optionally filtered by counterparts. Results are based on trade execution date.<br>Pagination is supported with 'offset' defining the starting point and 'limit' specifying the number of records per page.<br>The response includes links for previous and next pages.","operationId":"getHistoricalTrades","parameters":[{"name":"startDate","in":"query","required":true,"schema":{"type":"string"},"description":"Start date for the date range in YYYY-MM-DD format.","example":"2025-01-01"},{"name":"endDate","in":"query","required":false,"schema":{"type":"string"},"description":"End date for the date range in YYYY-MM-DD format.","example":"2025-01-31"},{"name":"counterparts","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"List of counterpart IDs to filter the trades.","example":["CP123","CP456"]}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0},"description":"Starting point of the records to retrieve (pagination).","example":0},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":30},"description":"Number of records to retrieve per page (pagination).","example":30}],"responses":{"200":{"description":"Trades found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedListExternalTrade"},"examples":{"example1":{"summary":"Success response","value":{"items":[{"tradeId":"T250711A8787","tradeTime":"2025-10-10T06:44:22.702Z","counterpart":"DEMOCP1","counterpartName":"DEMOCP","maturityDate":"2025-10-10","bought":{"currency":"DKK","amount":14500},"sold":{"currency":"USD","amount":2079.32},"product":"Forward","spotPrice":7.23,"forwardPrice":2.0E-4,"allInPrice":7.2302,"autoSettle":true,"comment":"Urgent client request"}],"next":"https://api.example.com/trade-reports?startDate=2025-05-20&endDate=2025-05-30&offset=5&limit=5","previous":"https://api.example.com/trade-reports?startDate=2025-05-10&endDate=2025-05-20&offset=0&limit=5"}},"example2":{"summary":"Success response 2","value":{"items":[{"tradeId":"W250429A1139","tradeTime":"2025-04-29T13:57:59.523Z","counterpart":"DBDEMO1","counterpartName":"DANSKE BANK DEMOAA","maturityDate":"2025-05-23","bought":{"currency":"DKK","amount":7.46},"sold":{"currency":"EUR","amount":1},"product":"FWD","spotPrice":7.46372,"forwardPrice":-0.0066376,"allInPrice":7.4570824,"autoSettle":true,"comment":"Successful retrieval of trades"}],"next":"https://api.example.com/trade-reports?startDate=2025-05-20&endDate=2025-05-30&offset=5&limit=5","previous":"https://api.example.com/trade-reports?startDate=2025-05-20&endDate=2025-05-30&offset=4&limit=5"}}}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/TradeError"}},"example":{"exception":"BadRequest","message":"The startDate parameter is required.","timestamp":"2025-10-07T10:30:00Z"}}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/TradeError"}},"example":{"exception":"AuthenticationException","message":"Session token validation failed: No key found in https://issuer.danskenet.net/.well-known/jwks.json with kid 6BBDAAA362B8C700FD2FF24BE979697DE0A58F5D.","timestamp":"2025-10-10T06:49:23.712321Z"}}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/TradeError"}},"example":{"exception":"Forbidden","message":"You do not have permission to access this resource.","timestamp":"2025-10-07T10:30:00Z"}}}}},"404":{"description":"Trades not found","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/TradeError"}},"example":{"exception":"NotFound","message":"No trades found for the given parameters.","timestamp":"2025-10-07T10:30:00Z"}}}}},"413":{"description":"Response Payload too large","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/TradeError"}},"example":{"exception":"PayloadTooLarge","message":"Request payload too large.","timestamp":"2025-10-07T10:30:00Z"}}}}},"500":{"description":"Error while fetching Trades","content":{"*/*":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/TradeError"}},"example":{"exception":"ServerError","message":"An unexpected error occurred while fetching trades.","timestamp":"2025-10-07T10:30:00Z"}}}}}}}}},"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"TradeError":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"Timestamp indicating when the error occurred.","example":"2025-10-07T10:41:00Z"},"exception":{"type":"string","description":"Type of the exception encountered.","example":"InvalidParameterException"},"message":{"type":"string","description":"Detailed error message.","example":"End date can not be future date."}}},"Amount":{"type":"object","properties":{"currency":{"type":"string","description":"Currency code in ISO 4217 format.","example":"USD"},"amount":{"type":"number","description":"Monetary value.","example":100000.5}}},"ExternalTrade":{"type":"object","properties":{"tradeTime":{"type":"string","format":"date-time","description":"Time when the trade was executed.","example":"2025-10-07T09:30:00Z"},"tradeId":{"type":"string","description":"Unique identifier for the executed trade.","example":"TRADE123456"},"counterpart":{"type":"string","description":"Counterpart's unique identifier.","example":["CP123","CP456"]},"counterpartName":{"type":"string","description":"Name of the counterpart.","example":"Counterpart Inc."},"maturityDate":{"type":"string","description":"Maturity or settlement date of the trade.","format":"date","example":"2025-12-31"},"bought":{"$ref":"#/components/schemas/Amount"},"sold":{"$ref":"#/components/schemas/Amount"},"product":{"type":"string","description":"Type of the FX Trade (Spot, Forward, Swap)","example":"Forward"},"spotPrice":{"type":"number","description":"The spot price at which the trade was executed.","example":7.23},"forwardPrice":{"type":"number","description":"The forward price agreed upon for the trade.","example":2.0E-4},"allInPrice":{"type":"number","description":"All-in price of the trade.","example":7.2302},"autoSettle":{"type":"boolean","description":"Indicates whether the trade is auto-settled.","example":true},"comment":{"type":"string","description":"Additional comments about the trade.","example":"Urgent trade settlement."}}},"PaginatedListExternalTrade":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ExternalTrade"},"example":{"tradeId":"W250429A1139","tradeTime":"2025-04-29T13:57:59.523Z","counterpart":"DBDEMO1","counterpartName":"DANSKE BANK DEMOAA","maturityDate":"2025-05-23","bought":{"currency":"DKK","amount":7.46},"sold":{"currency":"EUR","amount":1},"product":"FWD","spotPrice":7.46372,"forwardPrice":-0.0066376,"allInPrice":7.4570824,"autoSettle":true,"comment":"Successful retrieval of trades"}},"next":{"type":"string","description":"URL to fetch the next page of results.","example":"/v1/open-trades-service/trade-reports?startDate=2025-01-01&endDate=2025-01-31&offset=30&limit=30"},"previous":{"type":"string","description":"URL to fetch the previous page of results.","example":"/v1/open-trades-service/trade-reports?startDate=2025-01-01&endDate=2025-01-31&offset=0&limit=30"}}}}},"servers":[{"description":"Mock Environment - All possible response codes are randomly generated","url":"https://mock-api.danskebank.com/mock/sandbox/1.0.0/fx-open-and-historical-trades-api/v1/open-trades-service"},{"description":"PROD Environment","url":"https://api.danskebank.com/corporate/api/v1/open-trades-service"},{"description":"SANDBOX Environment","url":"https://sandbox-api.danskebank.com/sandbox-corporate/api/v1/open-trades-service"}]}