LogoLogo
Swivel v2.0.0
Swivel v2.0.0
  • Swivel Finance Documentation
  • Litepaper
    • zcTokens
      • Exiting/Selling zcTokens
      • Secondary AMM's
    • nTokens
      • Exiting/Selling nTokens
    • AMM vs. Orderbook
  • Swivel Exchange
    • Testnet Setup
    • Exchange Functions
      • Fixed-Yield Lending
      • Purchasing nTokens
      • Selling zcTokens
      • Selling nTokens
      • Splitting/Combining Tokens
      • Redeeming Tokens/Interest
    • Maturity
    • Liquidity Incentives
    • Minimums, Rate Limits & Fees
    • Retroactive Distribution
    • How to Claim SWIV Tokens
  • Developers
    • Exchange API
      • GET
        • Orderbook
        • Get Order
        • OHCLV (Candles)
        • Get Effective Price (Preview Market Order)
        • Get Order History
        • Get Last Trade Info
        • Get Markets
      • POST
        • Order
    • Swivel.js
      • API
        • Swivel
        • MarketPlace
        • VaultTracker
    • Swivel.py
      • swivel
        • swivel.abstracts
          • swivel.abstracts.deployed
          • swivel.abstracts.market_place
          • swivel.abstracts.swivel
          • swivel.abstracts.vault_tracker
        • swivel.contracts
          • swivel.contracts.market_place
          • swivel.contracts.swivel
          • swivel.contracts.vault_tracker
        • swivel.vendors
          • swivel.vendors.signer
          • swivel.vendors.w3
    • Scrivel (Python Examples)
    • Contracts Overview
      • Contracts
        • Swivel
        • MarketPlace
        • VaultTracker
    • Ubiquitous Language V2
      • Shared Language
      • UI Language
      • Technical Language
      • Compound Language
      • Finance Terms
  • Community & Media
  • Other Resources
    • Institutions
      • Rate Profile Optimization
        • Instruments and Participants
        • Market Opportunities and Pricing
        • Counterparty Risk Management
        • Benefits and drawbacks of standardization
        • User Needs
          • Corporate Treasury and Funding
          • Institutional Investors and Asset Managers
          • Speculators and Proprietary Trading Functions
          • Brokers and Market Makers
          • Liquidity Management, Funding and Resource Management
          • Risk Management and Insurance
          • Smaller Institutions and Individuals
      • Swivel for Enterprise
        • Overview
        • How Swivel works
        • Flexible Order Book
        • Future Developments
      • Delegated Credit
        • Challenges of Delegated Credit
          • Credit Pools
          • Intermediating Trust in Credit Delegation
Powered by GitBook
On this page
  1. Developers
  2. Exchange API
  3. GET

Get Effective Price (Preview Market Order)

Get Effective Price (Preview Market Order)

GET https://api.swivel.exchange/v2/fillpreview?underlying=u&maturity=m&volume=v&vault=w&exit=e

This endpoint allows you to request a limit order payload that matches a given market order. Returns the effective price as well as orders for consumption.

Query Parameters

Name
Type
Description

underlying*

string

The underlying token being transacted. E.g. USDC, DAI, etc.,

maturity*

string

The maturity of market in unix seconds.

volume*

string

The amount of currency to use.

vault*

boolean

Indicates if an order is in relation to a initiating/exiting a vault or zcToken

exit*

boolean

Indicated if an order is an exit or an initiate

{
    "orders": [
        {
            "order": {
                "key": "0xa8181ff6e0bfa16130944d5add7220eed46f44796de7d4216728dde40376ac5e",
                "maker": "0x096Da21Ac79ae1EDbC69A07CE5c705E6c77Fec90",
                "underlying": "0x5592EC0cfb4dbc12D3aB100b257153436a1f0FEa",
                "vault": true,
                "exit": false,
                "principal": "107758620689655172413793",
                "premium": "10000000000000000000000",
                "maturity": "1669957199",
                "expiry": "1641371984"
            },
            "meta": {
                "price": "0.0928",
                "signature": "0xa4e8958193cf2cb9c70e4c4a7df9c3c7b68f89fd2f250d80e6bc9dbd9cba8c54415fb2f4d8da33c1d81d5a028233255b52adbf36bee3a2a929fb3ea3e735ff7a1c",
                "premiumAvailable": "10000000000000000000000",
                "principalAvailable": "107758620689655172413793",
                "previewFill": "1000",
                "sequence": 63593
            }
        }
    ],
    "effectivePrice": "0.092799999999999997156",
    "timestamp": 1640178873
}
{
     "message": "passed volume exceeds available" 
}
{
    "message": "passed volume exceeds the maximum number of orders allowed"
}
PreviousOHCLV (Candles)NextGet Order History

Last updated 2 years ago