openapi: 3.0.2
info:
title: Cover Router Capacity Quote API
version: 2.4.1
servers:
- url: http://127.0.0.1:3000
description: Local server
- url: https://api.staging.nexusmutual.io/
description: Staging server
- url: https://api.nexusmutual.io/
description: Production server
tags:
- name: Quote
paths:
/v2/quote:
get:
tags:
- Quote
description: Get a quote for a cover
parameters:
- in: query
name: productId
required: true
schema:
type: integer
description: The product id
- in: query
name: amount
required: true
schema:
type: string
description: The cover amount
- in: query
name: period
required: true
schema:
type: integer
description: The cover period (in days)
- in: query
name: coverAsset
required: true
schema:
type: integer
description: The cover asset assetId (e.g. 0 for ETH, 1 for DAI)
- in: query
name: coverEditId
required: false
schema:
type: integer
description: The id of the cover that is being edited
responses:
'200':
description: Returns a quote object
content:
application/json:
schema:
type: object
properties:
quote:
type: object
properties:
totalCoverAmountInAsset:
type: string
format: integer
description: The total cover amount value in cover asset (smallest unit e.g. wei for ETH)
annualPrice:
type: string
format: integer
description: The annual price as a percentage value between 0-10,000. Should be divided by 10,000.
premiumInNXM:
type: string
format: integer
description: The premium value denominated in NXM. To be used when the payment is done using NXM.
premiumInAsset:
type: string
format: integer
description: The premium value denominated in the cover asset. To be used when the payment is done using the cover asset.
poolAllocationRequests:
type: array
description: Selected pools with necessary capacity for the requested cover. Necessary data for the buy cover tx request.
items:
type: object
properties:
poolId:
type: string
description: The pool id
coverAmountInAsset:
type: string
format: integer
description: The cover amount value that will be allocated from the pool capacity.
skip:
type: boolean
description: Skip
default: false
asset:
type: object
description: An object containing cover asset info
properties:
id:
type: integer
description: The id of the cover asset
symbol:
type: string
description: The symbol of the cover asset
decimals:
type: integer
description: The decimals of the cover asset
example: 18
'400':
description: Invalid Product Id, or Product is deprecated, or Not enough capacity, or Not original cover id