OptSwap
  • What is OptSwap?
  • Quick Start
    • Concepts & Definitions
    • Making Your First Trade
    • Managing Your Orders
    • Managing Your Positions
  • User Manual
    • Trading
      • Limit Orders
      • Option Spreads
      • Advanced Order Types
        • Batch Orders
        • All-or-None Fill Type
        • Multi-Legged Strategies
      • Automated Market Maker (AMM)
        • Managed Orders
        • Aggregated Spot Price
        • Liquidity Provider Rewards
        • Match Finder Rewards
      • Modify & Cancel Orders
      • Positions
        • Converting Positions
      • User Accounts
      • Options Oracles
      • Margin Requirements
      • Fees
    • Settlements
      • Exercise Option
      • Force Cash Settlements
      • Recover Margin
      • Automated Settlements
        • Settlements Execution Rewards
    • Meta Oracle
      • Methodology
      • Fetching Price Data
      • Price Mining
      • Managing Oracles
      • Donations
    • Governance
      • Concepts & Definitions
      • Tokenomics
      • Proposals
      • Proposal Types
      • Voting & Execution
      • Fundraising
      • DAO Treasury
      • Commercial Papers
      • Airdrops
      • Staking
      • OptSwap Miner
      • Contracts Registry
      • Testnet Faucet
      • Donations
  • Technical Reference
    • API Overview
    • Smart Contracts
      • Deployment Addresses
      • MetaOracle
      • OptSwap
      • OptSwapAMM
      • OptSwapDAOAirdrops
      • OptSwapDAOFundraising
      • OptSwapDAOGovernance
      • OptSwapDAOStaking
      • OptSwapDAOToken
      • OptSwapDAOVeToken
      • OptSwapDAOCommercialPaperToken
    • Subgraphs
      • Endpoints
      • Entities
      • Querying
        • Example Queries
    • REST API
      • Endpoints
      • API Methods
  • Other
    • Terms and Conditions
    • Risk Warnings
    • Privacy Policy
Powered by GitBook
On this page
  • Introduction
  • Software Requirements
  • Developer APIs

Was this helpful?

  1. Technical Reference

API Overview

"At some stage ... we should have to expect the machines to take control." — Alan Turing

PreviousDonationsNextSmart Contracts

Last updated 9 months ago

Was this helpful?

Introduction

The OptSwap protocol is comprised of multiple Core smart contracts which together provide the functionality of Decentralized Exchanges (DEXes), Automated Market Makers (AMMs), Meta Oracles, Staking, Fundraising, Airdrops and Governance.

The Core contracts provide all the fundamental safety guarantees for every user interacting with OptSwap. They define the governance rules, options trading & settlement logic, and all the interactions involving the underlying assets and cash tokens therein.

External calls will interact directly with the Core contracts using the Application Binary Interfaces (ABIs) which are provided for each of the smart contracts that is deployed. All the external calls are documented in this technical reference documentation. Internal functions and libraries are viewable on the OptSwap Github repository.

Software Requirements

OptSwap has been developed and compiled using the following libraries or frameworks:

  • Truffle

  • Ganache

  • Solidity

  • The Graph

For all smart contract interactions from an Externally Owned Account (EOA), you should be able to get by with just Web3.js; or the equivalent libraries/tools which support the Ethereum Virtual Machine (EVM) and EVM Application Binary Interfaces (ABIs) in your favorite programming language or framework.

The subgraphs can be queried with GraphQL using simple HTTPS requests and all responses are in JSON format. Therefore, it should be compatible out-of-the-box with any language or framework of your choice.

Developer APIs

Smart Contracts
Subgraphs
REST API