logicnodes-io Finance and exact math API
The Finance and exact math API from logicnodes-io — 6 operation(s) for finance and exact math.
The Finance and exact math API from logicnodes-io — 6 operation(s) for finance and exact math.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.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.curl "https://apis.io/api/v1/apis/logicnodes-io:logicnodes-io-finance-and-exact-math-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
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.
openapi: 3.2.0
info:
title: LogicNodes Finance and exact math API
version: 1.0.0
description: 'Blockchain and finance tools AI agents can trust: exact answers or typed errors, never a plausible guess. 40+ tools for EVM chains and Aptos (balances, token amounts, transaction status and receipts, contract and calldata decoding, payment verification, gas on 14 chains), exact finance math, and ERC-8004 agent reputation. Every answer carries a receipt timestamped into Bitcoin. Free tier; pay per call in USDC via x402 on 13 networks, no API key.'
x-guidance: 'How to use LogicNodes: 1) GET /v1/tools lists every tool with its JSON Schema. 2) POST /v1/tools/<name> with a JSON body, e.g. POST /v1/tools/evm_balance {"chain":"eip155:8453","address":"0x..."} or POST /v1/tools/token_amount_convert {"chain":"eip155:8453","asset":"<token address>","amount":"1.5","direction":"toBase"}. 3) Read "ok": true with "value", or "ok": false with a typed error: INVALID_INPUT (fix the field named), AMBIGUOUS_INPUT (pick one of the options listed and call again), NOT_FOUND, UPSTREAM_ERROR (retry). Chains are CAIP-2 ids (eip155:8453 Base, eip155:1 Ethereum, aptos:1); names like "base" are refused. Amounts are decimal strings, never floats. Pricing: free tools are unlimited; priced tools are free for 25 calls per day per IP, then the same URL returns 402 with x402 terms (USDC on Base, Solana, Polygon, Arbitrum and more: /v1/payments/methods); pay and retry. A failed call is never charged. MCP: /mcp/v2. Full guide: /agent-guide.'
contact:
email: denneyconner5@gmail.com
servers:
- url: https://logicnodes.io
tags:
- name: Finance and exact math
paths:
/paid/v1/tools/slippage_bounds:
post:
summary: Slippage bounds in base units ($0.001 per call)
description: From a quoted amount in base units (integer string) and a slippage tolerance in basis points, computes the minimum you should accept (min_out, rounded down) or the maximum you should pay (max_in, rounded up). Integer arithmetic only; the rounding direction is stated.
operationId: paid_slippage_bounds
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
amount:
type: string
slippageBps:
type: integer
minimum: 0
maximum: 10000
direction:
type: string
enum:
- min_out
- max_in
required:
- amount
- slippageBps
- direction
additionalProperties: false
example:
amount: '1000000'
slippageBps: 50
direction: min_out
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'400':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'402':
description: 'Payment Required: terms are in the base64 PAYMENT-REQUIRED response header'
'404':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'422':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'501':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'502':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'503':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
tags:
- Finance and exact math
x-payment-info:
price:
mode: fixed
currency: USD
amount: '0.001'
protocols:
- x402: {}
x-logicnodes:
asset: USDC
scheme: exact
methods: https://logicnodes.io/v1/payments/methods
terms: base64 PAYMENT-REQUIRED response header
/paid/v1/tools/swap_price_impact:
post:
summary: Constant-product swap output and price impact ($0.001 per call)
description: 'For a Uniswap-V2-style pool, computes the exact output of a swap (the router''s integer formula), the total cost versus the spot price including the fee, and the part due to trade size alone, in basis points. Inputs are reserves and amounts in base units. Does not know any pool: you supply the reserves.'
operationId: paid_swap_price_impact
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
reserveIn:
type: string
reserveOut:
type: string
amountIn:
type: string
feeBps:
type: integer
minimum: 0
maximum: 10000
required:
- reserveIn
- reserveOut
- amountIn
additionalProperties: false
example:
reserveIn: '1000000000'
reserveOut: '500000000000'
amountIn: '1000000'
feeBps: 30
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'400':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'402':
description: 'Payment Required: terms are in the base64 PAYMENT-REQUIRED response header'
'404':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'422':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'501':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'502':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'503':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
tags:
- Finance and exact math
x-payment-info:
price:
mode: fixed
currency: USD
amount: '0.001'
protocols:
- x402: {}
x-logicnodes:
asset: USDC
scheme: exact
methods: https://logicnodes.io/v1/payments/methods
terms: base64 PAYMENT-REQUIRED response header
/paid/v1/tools/money_calc:
post:
summary: Currency-aware money math ($0.001 per call)
description: Rounds, adds, subtracts, multiplies, or splits an amount of an ISO 4217 currency, using that currency's real number of minor units (JPY 0, USD 2, KWD 3). A currency not in the list is refused, never assumed to have 2 decimals. split divides a total into equal parts or by ratios so the parts always add back to the total exactly.
operationId: paid_money_calc
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
currency:
type: string
op:
type: string
enum:
- round
- add
- subtract
- multiply
- split
amount:
type: string
other:
type: string
factor:
type: string
parts:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
ratios:
type: array
items:
type: string
rounding:
description: rounding rule; default half_up (ties away from zero). half_even is banker's rounding
type: string
enum:
- down
- up
- floor
- ceil
- half_up
- half_even
- half_down
required:
- currency
- op
- amount
additionalProperties: false
example:
op: split
currency: USD
amount: '100.00'
parts: 3
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'400':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'402':
description: 'Payment Required: terms are in the base64 PAYMENT-REQUIRED response header'
'404':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'422':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'501':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'502':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'503':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
tags:
- Finance and exact math
x-payment-info:
price:
mode: fixed
currency: USD
amount: '0.001'
protocols:
- x402: {}
x-logicnodes:
asset: USDC
scheme: exact
methods: https://logicnodes.io/v1/payments/methods
terms: base64 PAYMENT-REQUIRED response header
/paid/v1/tools/interest_calc:
post:
summary: Simple and compound interest ($0.001 per call)
description: Exact simple or compound interest for a principal, an annual percentage rate and a term in years, compounded annually, semiannually, quarterly, monthly, weekly or daily. The number of periods must be whole; fractional periods are refused, not approximated. Also returns the effective annual rate.
operationId: paid_interest_calc
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
principal:
type: string
ratePercent:
type: string
years:
type: string
compounding:
type: string
enum:
- simple
- annual
- semiannual
- quarterly
- monthly
- weekly
- daily
scale:
type: integer
minimum: 0
maximum: 18
rounding:
description: rounding rule; default half_up (ties away from zero). half_even is banker's rounding
type: string
enum:
- down
- up
- floor
- ceil
- half_up
- half_even
- half_down
required:
- principal
- ratePercent
- years
- compounding
additionalProperties: false
example:
principal: '1000'
ratePercent: '5'
years: '1'
compounding: monthly
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'400':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'402':
description: 'Payment Required: terms are in the base64 PAYMENT-REQUIRED response header'
'404':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'422':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'501':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'502':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'503':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
tags:
- Finance and exact math
x-payment-info:
price:
mode: fixed
currency: USD
amount: '0.001'
protocols:
- x402: {}
x-logicnodes:
asset: USDC
scheme: exact
methods: https://logicnodes.io/v1/payments/methods
terms: base64 PAYMENT-REQUIRED response header
/paid/v1/tools/loan_calc:
post:
summary: Level-payment loan ($0.001 per call)
description: Monthly payment, total interest and total paid for a fixed-rate amortizing loan, in exact arithmetic. The payment is rounded once to the currency scale and the final payment absorbs the rounding so the balance ends at exactly zero.
operationId: paid_loan_calc
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
principal:
type: string
annualRatePercent:
type: string
termMonths:
type: integer
minimum: 1
maximum: 600
scale:
type: integer
minimum: 0
maximum: 8
rounding:
description: rounding rule; default half_up (ties away from zero). half_even is banker's rounding
type: string
enum:
- down
- up
- floor
- ceil
- half_up
- half_even
- half_down
required:
- principal
- annualRatePercent
- termMonths
additionalProperties: false
example:
principal: '200000'
annualRatePercent: '6'
termMonths: 360
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'400':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'402':
description: 'Payment Required: terms are in the base64 PAYMENT-REQUIRED response header'
'404':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'422':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'501':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'502':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'503':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
tags:
- Finance and exact math
x-payment-info:
price:
mode: fixed
currency: USD
amount: '0.001'
protocols:
- x402: {}
x-logicnodes:
asset: USDC
scheme: exact
methods: https://logicnodes.io/v1/payments/methods
terms: base64 PAYMENT-REQUIRED response header
/paid/v1/tools/business_days:
post:
summary: Business-day arithmetic ($0.001 per call)
description: 'Counts business days between two dates, adds business days to a date, or tests whether a date is a business day. Weekends are configurable. NO holidays are assumed: pass the holidays you want observed. Dates are calendar dates (YYYY-MM-DD) with no time zone.'
operationId: paid_business_days
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
op:
type: string
enum:
- count
- add
- is_business_day
from:
type: string
to:
type: string
days:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
weekend:
type: string
enum:
- sat_sun
- fri_sat
- sun_only
- none
holidays:
maxItems: 400
type: array
items:
type: string
required:
- op
- from
additionalProperties: false
example:
op: count
from: '2026-10-19'
to: '2026-10-30'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'400':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'402':
description: 'Payment Required: terms are in the base64 PAYMENT-REQUIRED response header'
'404':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'422':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'501':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'502':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
'503':
description: Error. Same ToolResponse shape with ok:false and a typed error.code
content:
application/json:
schema:
$ref: '#/components/schemas/ToolResponse'
tags:
- Finance and exact math
x-payment-info:
price:
mode: fixed
currency: USD
amount: '0.001'
protocols:
- x402: {}
x-logicnodes:
asset: USDC
scheme: exact
methods: https://logicnodes.io/v1/payments/methods
terms: base64 PAYMENT-REQUIRED response header
components:
schemas:
ToolResponse:
type: object
properties:
tool:
type: string
ok:
type: boolean
value:
description: present when ok
error:
type: object
properties:
code:
type: string
enum:
- INVALID_INPUT
- AMBIGUOUS_INPUT
- UNSUPPORTED_CHAIN
- UNSUPPORTED_CAPABILITY
- NOT_FOUND
- STALE_DATA
- NO_DATA
- UPSTREAM_ERROR
message:
type: string
field:
type: string
options:
type: array
items: {}
required:
- code
- message
provenance:
type: object
description: source, CAIP-2 chain, ledger position, fetchedAt
receipt:
type: object
properties:
version:
type: integer
algorithm:
type: string
tool:
type: string
digest:
type: string
required:
- tool
- ok
- receipt