Grain · Schema

AcceptOfflineHedgeProposalRequestBody

The payload required in order to accept an offline rate proposal and book the hedge.

FintechPaymentsCurrencyAPIEmbedded

Properties

Name Type Description
revision number The id of the revision that defines the accepted rate for the currency-pair and tenor.
fromCurrency object The currency in which the transaction should be paid at by your customer.
toCurrency object the currency you want to buy.
toCurrencyAmount number The amount to hedge in the toCurrency.
endAt object The date in which the hedge will be settled, denoted in `YYYY-MM-DD` format.
rate number Represents the exchange rate according to the offline map of currency pairs to tenor object. The calculation of the tenor is based on the difference in calendar days between the 'tenorCalculationDate'
externalTransactionId string Optional The transaction id, as identified within your system.
extraFields object
View JSON Schema on GitHub

JSON Schema

grainfinance-co-accept-offline-hedge-proposal-request-body-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/grainfinance-co/main/json-schema/grainfinance-co-accept-offline-hedge-proposal-request-body-schema.json",
  "title": "AcceptOfflineHedgeProposalRequestBody",
  "description": "The payload required in order to accept an offline rate proposal and book the hedge.",
  "x-generated": "2026-10-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/grainfinance-co-openapi.yaml#/components/schemas/AcceptOfflineHedgeProposalRequestBody",
  "properties": {
    "revision": {
      "type": "number",
      "format": "double",
      "description": "The id of the revision that defines the accepted rate for the currency-pair and tenor."
    },
    "fromCurrency": {
      "$ref": "#/$defs/CurrencyCode",
      "description": "The currency in which the transaction should be paid at by your customer."
    },
    "toCurrency": {
      "$ref": "#/$defs/CurrencyCode",
      "description": "the currency you want to buy."
    },
    "toCurrencyAmount": {
      "type": "number",
      "format": "double",
      "description": "The amount to hedge in the toCurrency."
    },
    "endAt": {
      "$ref": "#/$defs/GrainDateFormat",
      "description": "The date in which the hedge will be settled, denoted in `YYYY-MM-DD` format."
    },
    "rate": {
      "type": "number",
      "format": "double",
      "description": "Represents the exchange rate according to the offline map of currency pairs to tenor object.\n\nThe calculation of the tenor is based on the difference in calendar days between the 'tenorCalculationDate' and the 'endAt' date:\n\n- If the number of calendar days from 'tenorCalculationDate' to `endAt` is less than or equal to 7, the tenor is 7 days.\n- If the number of calendar days from 'tenorCalculationDate' to `endAt` is greater than 7 and less than or equal to 14, the tenor is 14 days.\n- If the number of calendar days from 'tenorCalculationDate' to `endAt` is greater than 14 and less than or equal to 30, the tenor is 30 days.\n- If the number of calendar days from 'tenorCalculationDate' to `endAt` is greater than 30 and less than or equal to 60, the tenor is 60 days.\n- ...\n- If the number of calendar days from 'tenorCalculationDate' to `endAt` is greater than 330 and less than or equal to 360, the tenor is 360 days.\n\nWhen counting the difference in calendar days, every day is counted as one regardless of the duration of the day. This means that the calculation includes all days: weekends, holidays, and weekdays alike.\n\nFor example, if the 'endAt' date is 2023-12-16 and the 'tenorCalculationDate' is 2024-12-15, the result is 1 calendar day.\n\nTo calculate the difference in calendar days accurately, we recommend using a date manipulation library, such as date-fns and its `differenceInCalendarDays` function, or a similar feature provided by other date libraries."
    },
    "externalTransactionId": {
      "type": "string",
      "description": "Optional The transaction id, as identified within your system."
    },
    "extraFields": {
      "$ref": "#/$defs/ExtraFieldsParam"
    }
  },
  "required": [
    "revision",
    "fromCurrency",
    "toCurrency",
    "toCurrencyAmount",
    "endAt",
    "rate"
  ],
  "type": "object",
  "additionalProperties": false,
  "$defs": {
    "CurrencyCode": {
      "type": "string",
      "description": "The alpha-3 ISO 4217 currency code of the related entity, in upper case.",
      "pattern": "^[A-Z]{3}$"
    },
    "ExtraFieldsParam": {
      "properties": {},
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number",
            "format": "double"
          },
          {
            "type": "boolean"
          }
        ]
      },
      "type": "object",
      "description": "Additional fields that provide further details about the transaction.\nThese fields should be specified as a valid JSON object."
    },
    "GrainDateFormat": {
      "type": "string",
      "format": "YYYY-MM-DD",
      "description": "The date format accepted by Grain's API. We accept dash separated ISO-8601 date-only strings.",
      "pattern": "\\d{4}-\\d{2}-\\d{2}"
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/grainfinance-co-accept-offline-hedge-proposal-request-body"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.