Test Our API

Compare Our Breakthrough For Yourself

By Oquant

We will walk you through how to access our APIs and run your own comparisons. To use our API, you simply make POST requests with JSON objects to our server. You will be served a JSON object in return. You can find a python implementation towards the end of this page. The URL for the api is http://oquant.com Please fill out the form at the bottom with the testing checkbox checked in to get your api key.

DISCLAIMER: This is service meant for testing and validation purposes. We aren't dedicating our cloud infrastructure to this API, so the response time could be high. If you are interested in the commercial product, with ultra low latency, please request a commercial lisence in the form below, by checking in the commercial checkbox.



calculate: This method returns the option price

api_key: The api key we issued to you as a string.

putCall: True if you want a call option.

S: The price of the underlying asset. Must be a double/float.

T: The time to maturity of the option. Must be a double/float.

sigma: The volatility of the underlying asset. Must be a double/float.

r: The interest rate. Must be a double/float.

d: The dividend yeild of the option. Must be a double/float.

K: The strike price of the option. Must be a double/float.

precision: The precision level of our algorithm (must be an integer between 1-4).

compTreeCus: A boolean flag to compute the tree price. You can disable it to save time.

numTreeNodes: Number of nodes to use on the trinomial tree (must be an integer from 1-10000)

Here is a sample JSON:

{
     "api_key": 'YOUR_API_KEY',
     "putCall":true,
     "S":180,
     "T":3,
     "sigma":0.9,
     "r":0.05,
     "d":0.05,
     "K":200,
     "precision":3,
     "compTreeCus":true,
     "numTreeNodes":10000
}


The return JSON has the following attributes:

ticks: Amount of time our approximation took in milliseconds.

price: Price that our approximation chose.

treeCusTicks: Amount of time the trinomial tree took in milliseconds

treeCusPrice: Price the trinomial tree chose.

juzPrice: Price that Ju-Zhong chose.

mbawPrice: Price that MBAW chose.

 {
   "ticks": 37,
   "treePrice": 0,
   "treeTicks": 0,
   "juzPrice": 5.998753336750754,
   "juzTicks": 0,
   "mbawPrice": 6.177890721784537,
   "mbawTicks": 0,
   "treeCusPrice": 5.982687344188385,
   "treeCusTicks": 1663,
   "european": 3.1703754026130078,
   "perpetual": 6.138981272971682,
   "price": 5.982972588015491
 }


impliedvolatility: This method returns implied volatility for a given contract

api_key: The api key we issued to you as a string.

putCall: True if you want a call option.

option_price: The price of the option contract

S: The price of the underlying asset. Must be a double/float.

T: The time to maturity of the option. Must be a double/float.

r: The interest rate. Must be a double/float.

d: The dividend yeild of the option. Must be a double/float.

K: The strike price of the option. Must be a double/float.

precision: The precision level of our algorithm (must be an integer between 1-4).

Here is a sample JSON:

{
     "api_key": 'YOUR_API_KEY',
     "putCall":true,
     "option_price":5.14,
     "S":105,
     "T":5,
     "r":0.02,
     "d":0.02,
     "K":100,
     "precision":3,
}


The return JSON has the following attributes:

ticks: Amount of time our approximation took in milliseconds.

sigma: The implied volatility.

 {
   "ticks": 37,
   "sigma": 0.0208176144163818
 }


Here is a python implementation:

import json
import requests
def run_impliedVolatilityRequest(putCall, option_price, S, T, r, d, K):
    request_json = { 'putCall': putCall,
                     'option_price': option_price,
                     'S': S,
                     'T': T,
                     'r': r,
                     'd': d,
                     'K': K,
                     'precision': 3,
                     'api_key': 'YOUR_API_KEY'
    }
    base_url = "http://oquant.com"
    method_url = "/impliedvolatility"
    
    api = base_url + method_url
    r = requests.post(api, data=request_json)
    return r.json()
def run_pricingRequest(putCall, S, T, sigma, r, d, K):
    request_json = { 'putCall': putCall,
                     'S': S,
                     'T': T,
                     'sigma': sigma,
                     'r': r,
                     'd': d,
                     'K': K,
                     'precision': 3,
                     'compTreeCus': True,
                     'numTreeNodes': 10000,
                     'api_key': 'YOUR_API_KEY'
    }
    base_url = "http://oquant.com"
    method_url = "/calculate"
    
    api = base_url + method_url
    r = requests.post(api, data=request_json)
    return r.json()
def call_option(S, T, sigma, r, d, K):
    return run_pricingRequest(True, S,T,sigma, r, d, K)
def put_option(S, T, sigma, r, d, K):
    return run_pricingRequest(False, S,T,sigma, r, d, K)
def call_impVol(S, T, sigma, r, d, K):
    return run_impliedVolatilityRequest(True, option_price, S,T, r, d, K)
def put_impVol(S, T, sigma, r, d, K):
    return run_impliedVolatilityRequest(False, option_price, S,T, r, d, K)

Fill out this form to get access to our API

  • Name (required)
  • Email (required)
  • License Type (required)
    Testing Commericial
  • What are you interested in? (required)