POST Returns all the option identifiers based on the conditions provided as input in the request
{{baseUrl}}/factset-options/v1/option-screening
BODY json

{
  "ids": "",
  "conditionOne": "",
  "conditionOneValue": "",
  "conditionTwo": "",
  "conditionTwoValue": "",
  "conditionThree": "",
  "conditionThreeValue": "",
  "date": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/factset-options/v1/option-screening");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"ids\": \"\",\n  \"conditionOne\": \"\",\n  \"conditionOneValue\": \"\",\n  \"conditionTwo\": \"\",\n  \"conditionTwoValue\": \"\",\n  \"conditionThree\": \"\",\n  \"conditionThreeValue\": \"\",\n  \"date\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/factset-options/v1/option-screening" {:content-type :json
                                                                                :form-params {:ids ""
                                                                                              :conditionOne ""
                                                                                              :conditionOneValue ""
                                                                                              :conditionTwo ""
                                                                                              :conditionTwoValue ""
                                                                                              :conditionThree ""
                                                                                              :conditionThreeValue ""
                                                                                              :date ""}})
require "http/client"

url = "{{baseUrl}}/factset-options/v1/option-screening"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"ids\": \"\",\n  \"conditionOne\": \"\",\n  \"conditionOneValue\": \"\",\n  \"conditionTwo\": \"\",\n  \"conditionTwoValue\": \"\",\n  \"conditionThree\": \"\",\n  \"conditionThreeValue\": \"\",\n  \"date\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/factset-options/v1/option-screening"),
    Content = new StringContent("{\n  \"ids\": \"\",\n  \"conditionOne\": \"\",\n  \"conditionOneValue\": \"\",\n  \"conditionTwo\": \"\",\n  \"conditionTwoValue\": \"\",\n  \"conditionThree\": \"\",\n  \"conditionThreeValue\": \"\",\n  \"date\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/factset-options/v1/option-screening");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"ids\": \"\",\n  \"conditionOne\": \"\",\n  \"conditionOneValue\": \"\",\n  \"conditionTwo\": \"\",\n  \"conditionTwoValue\": \"\",\n  \"conditionThree\": \"\",\n  \"conditionThreeValue\": \"\",\n  \"date\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/factset-options/v1/option-screening"

	payload := strings.NewReader("{\n  \"ids\": \"\",\n  \"conditionOne\": \"\",\n  \"conditionOneValue\": \"\",\n  \"conditionTwo\": \"\",\n  \"conditionTwoValue\": \"\",\n  \"conditionThree\": \"\",\n  \"conditionThreeValue\": \"\",\n  \"date\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/factset-options/v1/option-screening HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 180

{
  "ids": "",
  "conditionOne": "",
  "conditionOneValue": "",
  "conditionTwo": "",
  "conditionTwoValue": "",
  "conditionThree": "",
  "conditionThreeValue": "",
  "date": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/factset-options/v1/option-screening")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"ids\": \"\",\n  \"conditionOne\": \"\",\n  \"conditionOneValue\": \"\",\n  \"conditionTwo\": \"\",\n  \"conditionTwoValue\": \"\",\n  \"conditionThree\": \"\",\n  \"conditionThreeValue\": \"\",\n  \"date\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/factset-options/v1/option-screening"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"ids\": \"\",\n  \"conditionOne\": \"\",\n  \"conditionOneValue\": \"\",\n  \"conditionTwo\": \"\",\n  \"conditionTwoValue\": \"\",\n  \"conditionThree\": \"\",\n  \"conditionThreeValue\": \"\",\n  \"date\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"ids\": \"\",\n  \"conditionOne\": \"\",\n  \"conditionOneValue\": \"\",\n  \"conditionTwo\": \"\",\n  \"conditionTwoValue\": \"\",\n  \"conditionThree\": \"\",\n  \"conditionThreeValue\": \"\",\n  \"date\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/option-screening")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/factset-options/v1/option-screening")
  .header("content-type", "application/json")
  .body("{\n  \"ids\": \"\",\n  \"conditionOne\": \"\",\n  \"conditionOneValue\": \"\",\n  \"conditionTwo\": \"\",\n  \"conditionTwoValue\": \"\",\n  \"conditionThree\": \"\",\n  \"conditionThreeValue\": \"\",\n  \"date\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  ids: '',
  conditionOne: '',
  conditionOneValue: '',
  conditionTwo: '',
  conditionTwoValue: '',
  conditionThree: '',
  conditionThreeValue: '',
  date: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/factset-options/v1/option-screening');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/option-screening',
  headers: {'content-type': 'application/json'},
  data: {
    ids: '',
    conditionOne: '',
    conditionOneValue: '',
    conditionTwo: '',
    conditionTwoValue: '',
    conditionThree: '',
    conditionThreeValue: '',
    date: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/factset-options/v1/option-screening';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":"","conditionOne":"","conditionOneValue":"","conditionTwo":"","conditionTwoValue":"","conditionThree":"","conditionThreeValue":"","date":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/factset-options/v1/option-screening',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "ids": "",\n  "conditionOne": "",\n  "conditionOneValue": "",\n  "conditionTwo": "",\n  "conditionTwoValue": "",\n  "conditionThree": "",\n  "conditionThreeValue": "",\n  "date": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"ids\": \"\",\n  \"conditionOne\": \"\",\n  \"conditionOneValue\": \"\",\n  \"conditionTwo\": \"\",\n  \"conditionTwoValue\": \"\",\n  \"conditionThree\": \"\",\n  \"conditionThreeValue\": \"\",\n  \"date\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/option-screening")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/factset-options/v1/option-screening',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  ids: '',
  conditionOne: '',
  conditionOneValue: '',
  conditionTwo: '',
  conditionTwoValue: '',
  conditionThree: '',
  conditionThreeValue: '',
  date: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/option-screening',
  headers: {'content-type': 'application/json'},
  body: {
    ids: '',
    conditionOne: '',
    conditionOneValue: '',
    conditionTwo: '',
    conditionTwoValue: '',
    conditionThree: '',
    conditionThreeValue: '',
    date: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/factset-options/v1/option-screening');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  ids: '',
  conditionOne: '',
  conditionOneValue: '',
  conditionTwo: '',
  conditionTwoValue: '',
  conditionThree: '',
  conditionThreeValue: '',
  date: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/option-screening',
  headers: {'content-type': 'application/json'},
  data: {
    ids: '',
    conditionOne: '',
    conditionOneValue: '',
    conditionTwo: '',
    conditionTwoValue: '',
    conditionThree: '',
    conditionThreeValue: '',
    date: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/factset-options/v1/option-screening';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":"","conditionOne":"","conditionOneValue":"","conditionTwo":"","conditionTwoValue":"","conditionThree":"","conditionThreeValue":"","date":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ids": @"",
                              @"conditionOne": @"",
                              @"conditionOneValue": @"",
                              @"conditionTwo": @"",
                              @"conditionTwoValue": @"",
                              @"conditionThree": @"",
                              @"conditionThreeValue": @"",
                              @"date": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/factset-options/v1/option-screening"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/factset-options/v1/option-screening" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"ids\": \"\",\n  \"conditionOne\": \"\",\n  \"conditionOneValue\": \"\",\n  \"conditionTwo\": \"\",\n  \"conditionTwoValue\": \"\",\n  \"conditionThree\": \"\",\n  \"conditionThreeValue\": \"\",\n  \"date\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/factset-options/v1/option-screening",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'ids' => '',
    'conditionOne' => '',
    'conditionOneValue' => '',
    'conditionTwo' => '',
    'conditionTwoValue' => '',
    'conditionThree' => '',
    'conditionThreeValue' => '',
    'date' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/factset-options/v1/option-screening', [
  'body' => '{
  "ids": "",
  "conditionOne": "",
  "conditionOneValue": "",
  "conditionTwo": "",
  "conditionTwoValue": "",
  "conditionThree": "",
  "conditionThreeValue": "",
  "date": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/factset-options/v1/option-screening');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'ids' => '',
  'conditionOne' => '',
  'conditionOneValue' => '',
  'conditionTwo' => '',
  'conditionTwoValue' => '',
  'conditionThree' => '',
  'conditionThreeValue' => '',
  'date' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'ids' => '',
  'conditionOne' => '',
  'conditionOneValue' => '',
  'conditionTwo' => '',
  'conditionTwoValue' => '',
  'conditionThree' => '',
  'conditionThreeValue' => '',
  'date' => ''
]));
$request->setRequestUrl('{{baseUrl}}/factset-options/v1/option-screening');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/factset-options/v1/option-screening' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": "",
  "conditionOne": "",
  "conditionOneValue": "",
  "conditionTwo": "",
  "conditionTwoValue": "",
  "conditionThree": "",
  "conditionThreeValue": "",
  "date": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/factset-options/v1/option-screening' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": "",
  "conditionOne": "",
  "conditionOneValue": "",
  "conditionTwo": "",
  "conditionTwoValue": "",
  "conditionThree": "",
  "conditionThreeValue": "",
  "date": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"ids\": \"\",\n  \"conditionOne\": \"\",\n  \"conditionOneValue\": \"\",\n  \"conditionTwo\": \"\",\n  \"conditionTwoValue\": \"\",\n  \"conditionThree\": \"\",\n  \"conditionThreeValue\": \"\",\n  \"date\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/factset-options/v1/option-screening", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/factset-options/v1/option-screening"

payload = {
    "ids": "",
    "conditionOne": "",
    "conditionOneValue": "",
    "conditionTwo": "",
    "conditionTwoValue": "",
    "conditionThree": "",
    "conditionThreeValue": "",
    "date": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/factset-options/v1/option-screening"

payload <- "{\n  \"ids\": \"\",\n  \"conditionOne\": \"\",\n  \"conditionOneValue\": \"\",\n  \"conditionTwo\": \"\",\n  \"conditionTwoValue\": \"\",\n  \"conditionThree\": \"\",\n  \"conditionThreeValue\": \"\",\n  \"date\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/factset-options/v1/option-screening")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"ids\": \"\",\n  \"conditionOne\": \"\",\n  \"conditionOneValue\": \"\",\n  \"conditionTwo\": \"\",\n  \"conditionTwoValue\": \"\",\n  \"conditionThree\": \"\",\n  \"conditionThreeValue\": \"\",\n  \"date\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/factset-options/v1/option-screening') do |req|
  req.body = "{\n  \"ids\": \"\",\n  \"conditionOne\": \"\",\n  \"conditionOneValue\": \"\",\n  \"conditionTwo\": \"\",\n  \"conditionTwoValue\": \"\",\n  \"conditionThree\": \"\",\n  \"conditionThreeValue\": \"\",\n  \"date\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/factset-options/v1/option-screening";

    let payload = json!({
        "ids": "",
        "conditionOne": "",
        "conditionOneValue": "",
        "conditionTwo": "",
        "conditionTwoValue": "",
        "conditionThree": "",
        "conditionThreeValue": "",
        "date": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/factset-options/v1/option-screening \
  --header 'content-type: application/json' \
  --data '{
  "ids": "",
  "conditionOne": "",
  "conditionOneValue": "",
  "conditionTwo": "",
  "conditionTwoValue": "",
  "conditionThree": "",
  "conditionThreeValue": "",
  "date": ""
}'
echo '{
  "ids": "",
  "conditionOne": "",
  "conditionOneValue": "",
  "conditionTwo": "",
  "conditionTwoValue": "",
  "conditionThree": "",
  "conditionThreeValue": "",
  "date": ""
}' |  \
  http POST {{baseUrl}}/factset-options/v1/option-screening \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "ids": "",\n  "conditionOne": "",\n  "conditionOneValue": "",\n  "conditionTwo": "",\n  "conditionTwoValue": "",\n  "conditionThree": "",\n  "conditionThreeValue": "",\n  "date": ""\n}' \
  --output-document \
  - {{baseUrl}}/factset-options/v1/option-screening
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "ids": "",
  "conditionOne": "",
  "conditionOneValue": "",
  "conditionTwo": "",
  "conditionTwoValue": "",
  "conditionThree": "",
  "conditionThreeValue": "",
  "date": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/factset-options/v1/option-screening")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "optionId": "AAPL.US#C0185"
    },
    {
      "optionId": "AAPL.US#C0185"
    }
  ]
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The date parameter 'startDate' must be in the following date format: YYYY-MM-DD",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:48:42.016Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The parameter 'ids' is required and may not be empty.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:52:48.091Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The use of future dates is not applicable in this endpoint. Please revise your request to include dates up to today's current date.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:58:54.068Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Invalid Parameter (s): fakeParameterName1 fakeParameterName2. Please modify your request to use parameters outlined in the specification for this endpoint.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Malformed JSON Request",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-04T16:18:38.949Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The request took too long. Try again with a smaller request.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "User Authentication Failed",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "User Authentication Failed.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Forbidden",
  "timestamp": "2020-06-12T16:08:51.731Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "USERNAME-SERIAL does not have permission to use /factset-funds /v1/{endpoint}",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Unsupported Media Type",
  "timestamp": "2019-11-05T09:42:27.237Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "text/html media type is not supported. Supported media types are application/json",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Error writing JSON output",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-01T10:36:01.944Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Unexpected error",
  "subErrors": null
}
POST Returns all the underlying option identifiers for the specified underlying Security identifier
{{baseUrl}}/factset-options/v1/chains
BODY json

{
  "ids": [],
  "date": "",
  "idType": "",
  "exchange": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/factset-options/v1/chains");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"ids\": [],\n  \"date\": \"\",\n  \"idType\": \"\",\n  \"exchange\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/factset-options/v1/chains" {:content-type :json
                                                                      :form-params {:ids []
                                                                                    :date ""
                                                                                    :idType ""
                                                                                    :exchange ""}})
require "http/client"

url = "{{baseUrl}}/factset-options/v1/chains"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"ids\": [],\n  \"date\": \"\",\n  \"idType\": \"\",\n  \"exchange\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/factset-options/v1/chains"),
    Content = new StringContent("{\n  \"ids\": [],\n  \"date\": \"\",\n  \"idType\": \"\",\n  \"exchange\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/factset-options/v1/chains");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"ids\": [],\n  \"date\": \"\",\n  \"idType\": \"\",\n  \"exchange\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/factset-options/v1/chains"

	payload := strings.NewReader("{\n  \"ids\": [],\n  \"date\": \"\",\n  \"idType\": \"\",\n  \"exchange\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/factset-options/v1/chains HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 63

{
  "ids": [],
  "date": "",
  "idType": "",
  "exchange": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/factset-options/v1/chains")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"ids\": [],\n  \"date\": \"\",\n  \"idType\": \"\",\n  \"exchange\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/factset-options/v1/chains"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"ids\": [],\n  \"date\": \"\",\n  \"idType\": \"\",\n  \"exchange\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"ids\": [],\n  \"date\": \"\",\n  \"idType\": \"\",\n  \"exchange\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/chains")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/factset-options/v1/chains")
  .header("content-type", "application/json")
  .body("{\n  \"ids\": [],\n  \"date\": \"\",\n  \"idType\": \"\",\n  \"exchange\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  ids: [],
  date: '',
  idType: '',
  exchange: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/factset-options/v1/chains');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/chains',
  headers: {'content-type': 'application/json'},
  data: {ids: [], date: '', idType: '', exchange: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/factset-options/v1/chains';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":[],"date":"","idType":"","exchange":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/factset-options/v1/chains',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "ids": [],\n  "date": "",\n  "idType": "",\n  "exchange": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"ids\": [],\n  \"date\": \"\",\n  \"idType\": \"\",\n  \"exchange\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/chains")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/factset-options/v1/chains',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ids: [], date: '', idType: '', exchange: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/chains',
  headers: {'content-type': 'application/json'},
  body: {ids: [], date: '', idType: '', exchange: ''},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/factset-options/v1/chains');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  ids: [],
  date: '',
  idType: '',
  exchange: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/chains',
  headers: {'content-type': 'application/json'},
  data: {ids: [], date: '', idType: '', exchange: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/factset-options/v1/chains';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":[],"date":"","idType":"","exchange":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ids": @[  ],
                              @"date": @"",
                              @"idType": @"",
                              @"exchange": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/factset-options/v1/chains"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/factset-options/v1/chains" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"ids\": [],\n  \"date\": \"\",\n  \"idType\": \"\",\n  \"exchange\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/factset-options/v1/chains",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'ids' => [
        
    ],
    'date' => '',
    'idType' => '',
    'exchange' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/factset-options/v1/chains', [
  'body' => '{
  "ids": [],
  "date": "",
  "idType": "",
  "exchange": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/factset-options/v1/chains');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'ids' => [
    
  ],
  'date' => '',
  'idType' => '',
  'exchange' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'ids' => [
    
  ],
  'date' => '',
  'idType' => '',
  'exchange' => ''
]));
$request->setRequestUrl('{{baseUrl}}/factset-options/v1/chains');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/factset-options/v1/chains' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": [],
  "date": "",
  "idType": "",
  "exchange": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/factset-options/v1/chains' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": [],
  "date": "",
  "idType": "",
  "exchange": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"ids\": [],\n  \"date\": \"\",\n  \"idType\": \"\",\n  \"exchange\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/factset-options/v1/chains", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/factset-options/v1/chains"

payload = {
    "ids": [],
    "date": "",
    "idType": "",
    "exchange": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/factset-options/v1/chains"

payload <- "{\n  \"ids\": [],\n  \"date\": \"\",\n  \"idType\": \"\",\n  \"exchange\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/factset-options/v1/chains")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"ids\": [],\n  \"date\": \"\",\n  \"idType\": \"\",\n  \"exchange\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/factset-options/v1/chains') do |req|
  req.body = "{\n  \"ids\": [],\n  \"date\": \"\",\n  \"idType\": \"\",\n  \"exchange\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/factset-options/v1/chains";

    let payload = json!({
        "ids": (),
        "date": "",
        "idType": "",
        "exchange": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/factset-options/v1/chains \
  --header 'content-type: application/json' \
  --data '{
  "ids": [],
  "date": "",
  "idType": "",
  "exchange": ""
}'
echo '{
  "ids": [],
  "date": "",
  "idType": "",
  "exchange": ""
}' |  \
  http POST {{baseUrl}}/factset-options/v1/chains \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "ids": [],\n  "date": "",\n  "idType": "",\n  "exchange": ""\n}' \
  --output-document \
  - {{baseUrl}}/factset-options/v1/chains
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "ids": [],
  "date": "",
  "idType": "",
  "exchange": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/factset-options/v1/chains")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "date": "2021-05-07T00:00:00.000+0000",
      "idType": "FOS",
      "requestId": "TSLA",
      "fsymId": "WWDPYB-S",
      "optionId": "TSLA.US#C00LP"
    },
    {
      "date": "2021-05-07T00:00:00.000+0000",
      "idType": "FOS",
      "requestId": "TSLA",
      "fsymId": "WWDPYB-S",
      "optionId": "TSLA.US#C00LP"
    }
  ]
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The date parameter 'startDate' must be in the following date format: YYYY-MM-DD",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:48:42.016Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The parameter 'ids' is required and may not be empty.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:52:48.091Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The use of future dates is not applicable in this endpoint. Please revise your request to include dates up to today's current date.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:58:54.068Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Invalid Parameter (s): fakeParameterName1 fakeParameterName2. Please modify your request to use parameters outlined in the specification for this endpoint.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Malformed JSON Request",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-04T16:18:38.949Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The request took too long. Try again with a smaller request.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "User Authentication Failed",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "User Authentication Failed.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Forbidden",
  "timestamp": "2020-06-12T16:08:51.731Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "USERNAME-SERIAL does not have permission to use /factset-funds /v1/{endpoint}",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Unsupported Media Type",
  "timestamp": "2019-11-05T09:42:27.237Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "text/html media type is not supported. Supported media types are application/json",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Error writing JSON output",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-01T10:36:01.944Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Unexpected error",
  "subErrors": null
}
POST Returns the aggregate volume and open interest for the list of the options under the specified security identifier
{{baseUrl}}/factset-options/v1/underlying-volume
BODY json

{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/factset-options/v1/underlying-volume");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/factset-options/v1/underlying-volume" {:content-type :json
                                                                                 :form-params {:ids []
                                                                                               :startDate ""
                                                                                               :endDate ""
                                                                                               :frequency ""
                                                                                               :exchange ""}})
require "http/client"

url = "{{baseUrl}}/factset-options/v1/underlying-volume"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/factset-options/v1/underlying-volume"),
    Content = new StringContent("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/factset-options/v1/underlying-volume");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/factset-options/v1/underlying-volume"

	payload := strings.NewReader("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/factset-options/v1/underlying-volume HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 88

{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/factset-options/v1/underlying-volume")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/factset-options/v1/underlying-volume"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/underlying-volume")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/factset-options/v1/underlying-volume")
  .header("content-type", "application/json")
  .body("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  ids: [],
  startDate: '',
  endDate: '',
  frequency: '',
  exchange: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/factset-options/v1/underlying-volume');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/underlying-volume',
  headers: {'content-type': 'application/json'},
  data: {ids: [], startDate: '', endDate: '', frequency: '', exchange: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/factset-options/v1/underlying-volume';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":[],"startDate":"","endDate":"","frequency":"","exchange":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/factset-options/v1/underlying-volume',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "ids": [],\n  "startDate": "",\n  "endDate": "",\n  "frequency": "",\n  "exchange": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/underlying-volume")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/factset-options/v1/underlying-volume',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ids: [], startDate: '', endDate: '', frequency: '', exchange: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/underlying-volume',
  headers: {'content-type': 'application/json'},
  body: {ids: [], startDate: '', endDate: '', frequency: '', exchange: ''},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/factset-options/v1/underlying-volume');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  ids: [],
  startDate: '',
  endDate: '',
  frequency: '',
  exchange: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/underlying-volume',
  headers: {'content-type': 'application/json'},
  data: {ids: [], startDate: '', endDate: '', frequency: '', exchange: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/factset-options/v1/underlying-volume';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":[],"startDate":"","endDate":"","frequency":"","exchange":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ids": @[  ],
                              @"startDate": @"",
                              @"endDate": @"",
                              @"frequency": @"",
                              @"exchange": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/factset-options/v1/underlying-volume"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/factset-options/v1/underlying-volume" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/factset-options/v1/underlying-volume",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'ids' => [
        
    ],
    'startDate' => '',
    'endDate' => '',
    'frequency' => '',
    'exchange' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/factset-options/v1/underlying-volume', [
  'body' => '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/factset-options/v1/underlying-volume');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'ids' => [
    
  ],
  'startDate' => '',
  'endDate' => '',
  'frequency' => '',
  'exchange' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'ids' => [
    
  ],
  'startDate' => '',
  'endDate' => '',
  'frequency' => '',
  'exchange' => ''
]));
$request->setRequestUrl('{{baseUrl}}/factset-options/v1/underlying-volume');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/factset-options/v1/underlying-volume' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/factset-options/v1/underlying-volume' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/factset-options/v1/underlying-volume", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/factset-options/v1/underlying-volume"

payload = {
    "ids": [],
    "startDate": "",
    "endDate": "",
    "frequency": "",
    "exchange": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/factset-options/v1/underlying-volume"

payload <- "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/factset-options/v1/underlying-volume")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/factset-options/v1/underlying-volume') do |req|
  req.body = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/factset-options/v1/underlying-volume";

    let payload = json!({
        "ids": (),
        "startDate": "",
        "endDate": "",
        "frequency": "",
        "exchange": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/factset-options/v1/underlying-volume \
  --header 'content-type: application/json' \
  --data '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": ""
}'
echo '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": ""
}' |  \
  http POST {{baseUrl}}/factset-options/v1/underlying-volume \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "ids": [],\n  "startDate": "",\n  "endDate": "",\n  "frequency": "",\n  "exchange": ""\n}' \
  --output-document \
  - {{baseUrl}}/factset-options/v1/underlying-volume
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/factset-options/v1/underlying-volume")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "date": "2021-05-14T00:00:00.000+0000",
      "putCallRatio": 1.0257621,
      "totalPutOpenInterest": 2824399,
      "totalCallOpenInterest": 2753464,
      "totalPutVolume": 699680,
      "requestId": "TSLA",
      "fsymId": "WWDPYB-S",
      "exchange": "USA",
      "totalCallVolume": 946936,
      "totalPutCallVolume": 1646616,
      "totalPutCallOpenInterest": 5577863
    },
    {
      "date": "2021-05-14T00:00:00.000+0000",
      "putCallRatio": 1.0257621,
      "totalPutOpenInterest": 2824399,
      "totalCallOpenInterest": 2753464,
      "totalPutVolume": 699680,
      "requestId": "TSLA",
      "fsymId": "WWDPYB-S",
      "exchange": "USA",
      "totalCallVolume": 946936,
      "totalPutCallVolume": 1646616,
      "totalPutCallOpenInterest": 5577863
    }
  ]
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The date parameter 'startDate' must be in the following date format: YYYY-MM-DD",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:48:42.016Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The parameter 'ids' is required and may not be empty.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:52:48.091Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The use of future dates is not applicable in this endpoint. Please revise your request to include dates up to today's current date.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:58:54.068Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Invalid Parameter (s): fakeParameterName1 fakeParameterName2. Please modify your request to use parameters outlined in the specification for this endpoint.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Malformed JSON Request",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-04T16:18:38.949Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The request took too long. Try again with a smaller request.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "User Authentication Failed",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "User Authentication Failed.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Forbidden",
  "timestamp": "2020-06-12T16:08:51.731Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "USERNAME-SERIAL does not have permission to use /factset-funds /v1/{endpoint}",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Unsupported Media Type",
  "timestamp": "2019-11-05T09:42:27.237Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "text/html media type is not supported. Supported media types are application/json",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Error writing JSON output",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-01T10:36:01.944Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Unexpected error",
  "subErrors": null
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/factset-options/v1/prices");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/factset-options/v1/prices" {:content-type :json
                                                                      :form-params {:ids []
                                                                                    :startDate ""
                                                                                    :endDate ""
                                                                                    :frequency ""
                                                                                    :currency ""
                                                                                    :calendar ""}})
require "http/client"

url = "{{baseUrl}}/factset-options/v1/prices"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/factset-options/v1/prices"),
    Content = new StringContent("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/factset-options/v1/prices");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/factset-options/v1/prices"

	payload := strings.NewReader("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/factset-options/v1/prices HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 106

{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "currency": "",
  "calendar": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/factset-options/v1/prices")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/factset-options/v1/prices"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/prices")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/factset-options/v1/prices")
  .header("content-type", "application/json")
  .body("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  ids: [],
  startDate: '',
  endDate: '',
  frequency: '',
  currency: '',
  calendar: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/factset-options/v1/prices');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/prices',
  headers: {'content-type': 'application/json'},
  data: {ids: [], startDate: '', endDate: '', frequency: '', currency: '', calendar: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/factset-options/v1/prices';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":[],"startDate":"","endDate":"","frequency":"","currency":"","calendar":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/factset-options/v1/prices',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "ids": [],\n  "startDate": "",\n  "endDate": "",\n  "frequency": "",\n  "currency": "",\n  "calendar": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/prices")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/factset-options/v1/prices',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ids: [], startDate: '', endDate: '', frequency: '', currency: '', calendar: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/prices',
  headers: {'content-type': 'application/json'},
  body: {ids: [], startDate: '', endDate: '', frequency: '', currency: '', calendar: ''},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/factset-options/v1/prices');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  ids: [],
  startDate: '',
  endDate: '',
  frequency: '',
  currency: '',
  calendar: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/prices',
  headers: {'content-type': 'application/json'},
  data: {ids: [], startDate: '', endDate: '', frequency: '', currency: '', calendar: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/factset-options/v1/prices';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":[],"startDate":"","endDate":"","frequency":"","currency":"","calendar":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ids": @[  ],
                              @"startDate": @"",
                              @"endDate": @"",
                              @"frequency": @"",
                              @"currency": @"",
                              @"calendar": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/factset-options/v1/prices"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/factset-options/v1/prices" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/factset-options/v1/prices",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'ids' => [
        
    ],
    'startDate' => '',
    'endDate' => '',
    'frequency' => '',
    'currency' => '',
    'calendar' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/factset-options/v1/prices', [
  'body' => '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "currency": "",
  "calendar": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/factset-options/v1/prices');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'ids' => [
    
  ],
  'startDate' => '',
  'endDate' => '',
  'frequency' => '',
  'currency' => '',
  'calendar' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'ids' => [
    
  ],
  'startDate' => '',
  'endDate' => '',
  'frequency' => '',
  'currency' => '',
  'calendar' => ''
]));
$request->setRequestUrl('{{baseUrl}}/factset-options/v1/prices');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/factset-options/v1/prices' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "currency": "",
  "calendar": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/factset-options/v1/prices' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "currency": "",
  "calendar": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/factset-options/v1/prices", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/factset-options/v1/prices"

payload = {
    "ids": [],
    "startDate": "",
    "endDate": "",
    "frequency": "",
    "currency": "",
    "calendar": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/factset-options/v1/prices"

payload <- "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/factset-options/v1/prices")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/factset-options/v1/prices') do |req|
  req.body = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/factset-options/v1/prices";

    let payload = json!({
        "ids": (),
        "startDate": "",
        "endDate": "",
        "frequency": "",
        "currency": "",
        "calendar": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/factset-options/v1/prices \
  --header 'content-type: application/json' \
  --data '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "currency": "",
  "calendar": ""
}'
echo '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "currency": "",
  "calendar": ""
}' |  \
  http POST {{baseUrl}}/factset-options/v1/prices \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "ids": [],\n  "startDate": "",\n  "endDate": "",\n  "frequency": "",\n  "currency": "",\n  "calendar": ""\n}' \
  --output-document \
  - {{baseUrl}}/factset-options/v1/prices
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "currency": "",
  "calendar": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/factset-options/v1/prices")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "date": "2021-05-05T00:00:00.000+0000",
      "askTime": 155959,
      "priceStrike": 190,
      "priceMidBidAsk": 482.125,
      "price52WeekHigh": 663.6,
      "fsymId": "TSLA.US#C00LP",
      "priceAsk": 492,
      "priceBid": 472.25,
      "priceHigh": 6.027456183070403,
      "quoteType": "Mid Bid/Ask Price",
      "bidTime": 155959,
      "priceLow": 1.4658129805029452,
      "priceUnderlying": 670.94,
      "price": 428.375,
      "requestId": "TSLA.US#C00LP",
      "priceSettlement": 5.962133916683182,
      "priceOpen": 0.8008281904610115,
      "price52WeekLow": 189.3
    },
    {
      "date": "2021-05-05T00:00:00.000+0000",
      "askTime": 155959,
      "priceStrike": 190,
      "priceMidBidAsk": 482.125,
      "price52WeekHigh": 663.6,
      "fsymId": "TSLA.US#C00LP",
      "priceAsk": 492,
      "priceBid": 472.25,
      "priceHigh": 6.027456183070403,
      "quoteType": "Mid Bid/Ask Price",
      "bidTime": 155959,
      "priceLow": 1.4658129805029452,
      "priceUnderlying": 670.94,
      "price": 428.375,
      "requestId": "TSLA.US#C00LP",
      "priceSettlement": 5.962133916683182,
      "priceOpen": 0.8008281904610115,
      "price52WeekLow": 189.3
    }
  ]
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The date parameter 'startDate' must be in the following date format: YYYY-MM-DD",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:48:42.016Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The parameter 'ids' is required and may not be empty.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:52:48.091Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The use of future dates is not applicable in this endpoint. Please revise your request to include dates up to today's current date.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:58:54.068Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Invalid Parameter (s): fakeParameterName1 fakeParameterName2. Please modify your request to use parameters outlined in the specification for this endpoint.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Malformed JSON Request",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-04T16:18:38.949Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The request took too long. Try again with a smaller request.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "User Authentication Failed",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "User Authentication Failed.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Forbidden",
  "timestamp": "2020-06-12T16:08:51.731Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "USERNAME-SERIAL does not have permission to use /factset-funds /v1/{endpoint}",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Unsupported Media Type",
  "timestamp": "2019-11-05T09:42:27.237Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "text/html media type is not supported. Supported media types are application/json",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Error writing JSON output",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-01T10:36:01.944Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Unexpected error",
  "subErrors": null
}
POST Returns the volume details for the specified option identifier
{{baseUrl}}/factset-options/v1/volume
BODY json

{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": "",
  "calendar": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/factset-options/v1/volume");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"calendar\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/factset-options/v1/volume" {:content-type :json
                                                                      :form-params {:ids []
                                                                                    :startDate ""
                                                                                    :endDate ""
                                                                                    :frequency ""
                                                                                    :exchange ""
                                                                                    :calendar ""}})
require "http/client"

url = "{{baseUrl}}/factset-options/v1/volume"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"calendar\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/factset-options/v1/volume"),
    Content = new StringContent("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"calendar\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/factset-options/v1/volume");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"calendar\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/factset-options/v1/volume"

	payload := strings.NewReader("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"calendar\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/factset-options/v1/volume HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 106

{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": "",
  "calendar": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/factset-options/v1/volume")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"calendar\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/factset-options/v1/volume"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"calendar\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"calendar\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/volume")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/factset-options/v1/volume")
  .header("content-type", "application/json")
  .body("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"calendar\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  ids: [],
  startDate: '',
  endDate: '',
  frequency: '',
  exchange: '',
  calendar: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/factset-options/v1/volume');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/volume',
  headers: {'content-type': 'application/json'},
  data: {ids: [], startDate: '', endDate: '', frequency: '', exchange: '', calendar: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/factset-options/v1/volume';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":[],"startDate":"","endDate":"","frequency":"","exchange":"","calendar":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/factset-options/v1/volume',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "ids": [],\n  "startDate": "",\n  "endDate": "",\n  "frequency": "",\n  "exchange": "",\n  "calendar": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"calendar\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/volume")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/factset-options/v1/volume',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ids: [], startDate: '', endDate: '', frequency: '', exchange: '', calendar: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/volume',
  headers: {'content-type': 'application/json'},
  body: {ids: [], startDate: '', endDate: '', frequency: '', exchange: '', calendar: ''},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/factset-options/v1/volume');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  ids: [],
  startDate: '',
  endDate: '',
  frequency: '',
  exchange: '',
  calendar: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/volume',
  headers: {'content-type': 'application/json'},
  data: {ids: [], startDate: '', endDate: '', frequency: '', exchange: '', calendar: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/factset-options/v1/volume';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":[],"startDate":"","endDate":"","frequency":"","exchange":"","calendar":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ids": @[  ],
                              @"startDate": @"",
                              @"endDate": @"",
                              @"frequency": @"",
                              @"exchange": @"",
                              @"calendar": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/factset-options/v1/volume"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/factset-options/v1/volume" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"calendar\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/factset-options/v1/volume",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'ids' => [
        
    ],
    'startDate' => '',
    'endDate' => '',
    'frequency' => '',
    'exchange' => '',
    'calendar' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/factset-options/v1/volume', [
  'body' => '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": "",
  "calendar": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/factset-options/v1/volume');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'ids' => [
    
  ],
  'startDate' => '',
  'endDate' => '',
  'frequency' => '',
  'exchange' => '',
  'calendar' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'ids' => [
    
  ],
  'startDate' => '',
  'endDate' => '',
  'frequency' => '',
  'exchange' => '',
  'calendar' => ''
]));
$request->setRequestUrl('{{baseUrl}}/factset-options/v1/volume');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/factset-options/v1/volume' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": "",
  "calendar": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/factset-options/v1/volume' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": "",
  "calendar": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"calendar\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/factset-options/v1/volume", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/factset-options/v1/volume"

payload = {
    "ids": [],
    "startDate": "",
    "endDate": "",
    "frequency": "",
    "exchange": "",
    "calendar": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/factset-options/v1/volume"

payload <- "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"calendar\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/factset-options/v1/volume")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"calendar\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/factset-options/v1/volume') do |req|
  req.body = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"calendar\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/factset-options/v1/volume";

    let payload = json!({
        "ids": (),
        "startDate": "",
        "endDate": "",
        "frequency": "",
        "exchange": "",
        "calendar": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/factset-options/v1/volume \
  --header 'content-type: application/json' \
  --data '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": "",
  "calendar": ""
}'
echo '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": "",
  "calendar": ""
}' |  \
  http POST {{baseUrl}}/factset-options/v1/volume \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "ids": [],\n  "startDate": "",\n  "endDate": "",\n  "frequency": "",\n  "exchange": "",\n  "calendar": ""\n}' \
  --output-document \
  - {{baseUrl}}/factset-options/v1/volume
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": "",
  "calendar": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/factset-options/v1/volume")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "date": "2021-05-06T00:00:00.000+0000",
      "volume": 3017,
      "openInterest": 92,
      "requestId": "TSLA.US#PYG8L-USA",
      "fsymId": "TSLA.US#PYG8L",
      "exchange": "USA"
    },
    {
      "date": "2021-05-06T00:00:00.000+0000",
      "volume": 3017,
      "openInterest": 92,
      "requestId": "TSLA.US#PYG8L-USA",
      "fsymId": "TSLA.US#PYG8L",
      "exchange": "USA"
    }
  ]
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The date parameter 'startDate' must be in the following date format: YYYY-MM-DD",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:48:42.016Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The parameter 'ids' is required and may not be empty.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:52:48.091Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The use of future dates is not applicable in this endpoint. Please revise your request to include dates up to today's current date.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:58:54.068Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Invalid Parameter (s): fakeParameterName1 fakeParameterName2. Please modify your request to use parameters outlined in the specification for this endpoint.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Malformed JSON Request",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-04T16:18:38.949Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The request took too long. Try again with a smaller request.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "User Authentication Failed",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "User Authentication Failed.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Forbidden",
  "timestamp": "2020-06-12T16:08:51.731Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "USERNAME-SERIAL does not have permission to use /factset-funds /v1/{endpoint}",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Unsupported Media Type",
  "timestamp": "2019-11-05T09:42:27.237Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "text/html media type is not supported. Supported media types are application/json",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Error writing JSON output",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-01T10:36:01.944Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Unexpected error",
  "subErrors": null
}
POST Returns basic reference details for the options such as currency, exchange, symbols, flags and more
{{baseUrl}}/factset-options/v1/references
BODY json

{
  "ids": []
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/factset-options/v1/references");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"ids\": []\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/factset-options/v1/references" {:content-type :json
                                                                          :form-params {:ids []}})
require "http/client"

url = "{{baseUrl}}/factset-options/v1/references"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"ids\": []\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/factset-options/v1/references"),
    Content = new StringContent("{\n  \"ids\": []\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/factset-options/v1/references");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"ids\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/factset-options/v1/references"

	payload := strings.NewReader("{\n  \"ids\": []\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/factset-options/v1/references HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 15

{
  "ids": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/factset-options/v1/references")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"ids\": []\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/factset-options/v1/references"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"ids\": []\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"ids\": []\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/references")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/factset-options/v1/references")
  .header("content-type", "application/json")
  .body("{\n  \"ids\": []\n}")
  .asString();
const data = JSON.stringify({
  ids: []
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/factset-options/v1/references');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/references',
  headers: {'content-type': 'application/json'},
  data: {ids: []}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/factset-options/v1/references';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":[]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/factset-options/v1/references',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "ids": []\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"ids\": []\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/references")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/factset-options/v1/references',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ids: []}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/references',
  headers: {'content-type': 'application/json'},
  body: {ids: []},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/factset-options/v1/references');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  ids: []
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/references',
  headers: {'content-type': 'application/json'},
  data: {ids: []}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/factset-options/v1/references';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":[]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ids": @[  ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/factset-options/v1/references"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/factset-options/v1/references" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"ids\": []\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/factset-options/v1/references",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'ids' => [
        
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/factset-options/v1/references', [
  'body' => '{
  "ids": []
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/factset-options/v1/references');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'ids' => [
    
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'ids' => [
    
  ]
]));
$request->setRequestUrl('{{baseUrl}}/factset-options/v1/references');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/factset-options/v1/references' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/factset-options/v1/references' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": []
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"ids\": []\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/factset-options/v1/references", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/factset-options/v1/references"

payload = { "ids": [] }
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/factset-options/v1/references"

payload <- "{\n  \"ids\": []\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/factset-options/v1/references")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"ids\": []\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/factset-options/v1/references') do |req|
  req.body = "{\n  \"ids\": []\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/factset-options/v1/references";

    let payload = json!({"ids": ()});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/factset-options/v1/references \
  --header 'content-type: application/json' \
  --data '{
  "ids": []
}'
echo '{
  "ids": []
}' |  \
  http POST {{baseUrl}}/factset-options/v1/references \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "ids": []\n}' \
  --output-document \
  - {{baseUrl}}/factset-options/v1/references
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["ids": []] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/factset-options/v1/references")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "date": "2021-05-07T00:00:00.000+0000",
      "underlyingFsymSecurityId": "WWDPYB-S",
      "fsymId": "TSLA.US#C00LP",
      "opra17Symbol": "TSLA#I1721C190000",
      "expirationMonth": "SEP",
      "type": 1,
      "settlementMethod": "settlementMethod",
      "rootTicker": "TSLA",
      "adjustedFlag": "N",
      "lepoFlag": 0,
      "requestId": "TSLA.US#C00LP",
      "occ21Symbol": "TSLA#210917C00190000",
      "name": "Tesla Inc Call SEP21 190.00 (LEAPs)",
      "contractSize": 100,
      "currency": "USD",
      "exchange": "USA",
      "expirationFrequency": "LEAPS",
      "style": 0,
      "callPutFlag": 0,
      "callPutPairSymbol": "TSLA.US#PGGVL",
      "expirationDate": "2021-09-17T00:00:00.000+0000"
    },
    {
      "date": "2021-05-07T00:00:00.000+0000",
      "underlyingFsymSecurityId": "WWDPYB-S",
      "fsymId": "TSLA.US#C00LP",
      "opra17Symbol": "TSLA#I1721C190000",
      "expirationMonth": "SEP",
      "type": 1,
      "settlementMethod": "settlementMethod",
      "rootTicker": "TSLA",
      "adjustedFlag": "N",
      "lepoFlag": 0,
      "requestId": "TSLA.US#C00LP",
      "occ21Symbol": "TSLA#210917C00190000",
      "name": "Tesla Inc Call SEP21 190.00 (LEAPs)",
      "contractSize": 100,
      "currency": "USD",
      "exchange": "USA",
      "expirationFrequency": "LEAPS",
      "style": 0,
      "callPutFlag": 0,
      "callPutPairSymbol": "TSLA.US#PGGVL",
      "expirationDate": "2021-09-17T00:00:00.000+0000"
    }
  ]
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The date parameter 'startDate' must be in the following date format: YYYY-MM-DD",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:48:42.016Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The parameter 'ids' is required and may not be empty.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:52:48.091Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The use of future dates is not applicable in this endpoint. Please revise your request to include dates up to today's current date.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:58:54.068Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Invalid Parameter (s): fakeParameterName1 fakeParameterName2. Please modify your request to use parameters outlined in the specification for this endpoint.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Malformed JSON Request",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-04T16:18:38.949Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The request took too long. Try again with a smaller request.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "User Authentication Failed",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "User Authentication Failed.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Forbidden",
  "timestamp": "2020-06-12T16:08:51.731Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "USERNAME-SERIAL does not have permission to use /factset-funds /v1/{endpoint}",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Unsupported Media Type",
  "timestamp": "2019-11-05T09:42:27.237Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "text/html media type is not supported. Supported media types are application/json",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Error writing JSON output",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-01T10:36:01.944Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Unexpected error",
  "subErrors": null
}
POST Returns option security dates such as expiration and trade.
{{baseUrl}}/factset-options/v1/dates
BODY json

{
  "ids": []
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/factset-options/v1/dates");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"ids\": []\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/factset-options/v1/dates" {:content-type :json
                                                                     :form-params {:ids []}})
require "http/client"

url = "{{baseUrl}}/factset-options/v1/dates"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"ids\": []\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/factset-options/v1/dates"),
    Content = new StringContent("{\n  \"ids\": []\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/factset-options/v1/dates");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"ids\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/factset-options/v1/dates"

	payload := strings.NewReader("{\n  \"ids\": []\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/factset-options/v1/dates HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 15

{
  "ids": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/factset-options/v1/dates")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"ids\": []\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/factset-options/v1/dates"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"ids\": []\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"ids\": []\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/dates")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/factset-options/v1/dates")
  .header("content-type", "application/json")
  .body("{\n  \"ids\": []\n}")
  .asString();
const data = JSON.stringify({
  ids: []
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/factset-options/v1/dates');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/dates',
  headers: {'content-type': 'application/json'},
  data: {ids: []}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/factset-options/v1/dates';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":[]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/factset-options/v1/dates',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "ids": []\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"ids\": []\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/dates")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/factset-options/v1/dates',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ids: []}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/dates',
  headers: {'content-type': 'application/json'},
  body: {ids: []},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/factset-options/v1/dates');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  ids: []
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/dates',
  headers: {'content-type': 'application/json'},
  data: {ids: []}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/factset-options/v1/dates';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":[]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ids": @[  ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/factset-options/v1/dates"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/factset-options/v1/dates" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"ids\": []\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/factset-options/v1/dates",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'ids' => [
        
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/factset-options/v1/dates', [
  'body' => '{
  "ids": []
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/factset-options/v1/dates');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'ids' => [
    
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'ids' => [
    
  ]
]));
$request->setRequestUrl('{{baseUrl}}/factset-options/v1/dates');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/factset-options/v1/dates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/factset-options/v1/dates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": []
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"ids\": []\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/factset-options/v1/dates", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/factset-options/v1/dates"

payload = { "ids": [] }
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/factset-options/v1/dates"

payload <- "{\n  \"ids\": []\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/factset-options/v1/dates")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"ids\": []\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/factset-options/v1/dates') do |req|
  req.body = "{\n  \"ids\": []\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/factset-options/v1/dates";

    let payload = json!({"ids": ()});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/factset-options/v1/dates \
  --header 'content-type: application/json' \
  --data '{
  "ids": []
}'
echo '{
  "ids": []
}' |  \
  http POST {{baseUrl}}/factset-options/v1/dates \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "ids": []\n}' \
  --output-document \
  - {{baseUrl}}/factset-options/v1/dates
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["ids": []] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/factset-options/v1/dates")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "date": "2021-05-07T00:00:00.000+0000",
      "firstAskDate": "2020-08-31T00:00:00.000+0000",
      "firstBidDate": "2020-08-31T00:00:00.000+0000",
      "lastSettlementDate": "2000-01-23T00:00:00.000Z",
      "firstSettlementDate": "2000-01-23T00:00:00.000Z",
      "firstTradeDate": "2020-09-01T00:00:00.000+0000",
      "requestId": "TSLA.US#C00LP",
      "fsymId": "TSLA.US#C00LP",
      "lastTradeDate": "2021-02-16T00:00:00.000+0000",
      "lastBidDate": "2021-05-05T00:00:00.000+0000",
      "lastAskDate": "2021-05-05T00:00:00.000+0000",
      "expirationDate": "2021-09-17T00:00:00.000+0000"
    },
    {
      "date": "2021-05-07T00:00:00.000+0000",
      "firstAskDate": "2020-08-31T00:00:00.000+0000",
      "firstBidDate": "2020-08-31T00:00:00.000+0000",
      "lastSettlementDate": "2000-01-23T00:00:00.000Z",
      "firstSettlementDate": "2000-01-23T00:00:00.000Z",
      "firstTradeDate": "2020-09-01T00:00:00.000+0000",
      "requestId": "TSLA.US#C00LP",
      "fsymId": "TSLA.US#C00LP",
      "lastTradeDate": "2021-02-16T00:00:00.000+0000",
      "lastBidDate": "2021-05-05T00:00:00.000+0000",
      "lastAskDate": "2021-05-05T00:00:00.000+0000",
      "expirationDate": "2021-09-17T00:00:00.000+0000"
    }
  ]
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The date parameter 'startDate' must be in the following date format: YYYY-MM-DD",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:48:42.016Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The parameter 'ids' is required and may not be empty.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:52:48.091Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The use of future dates is not applicable in this endpoint. Please revise your request to include dates up to today's current date.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:58:54.068Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Invalid Parameter (s): fakeParameterName1 fakeParameterName2. Please modify your request to use parameters outlined in the specification for this endpoint.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Malformed JSON Request",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-04T16:18:38.949Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The request took too long. Try again with a smaller request.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "User Authentication Failed",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "User Authentication Failed.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Forbidden",
  "timestamp": "2020-06-12T16:08:51.731Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "USERNAME-SERIAL does not have permission to use /factset-funds /v1/{endpoint}",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Unsupported Media Type",
  "timestamp": "2019-11-05T09:42:27.237Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "text/html media type is not supported. Supported media types are application/json",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Error writing JSON output",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-01T10:36:01.944Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Unexpected error",
  "subErrors": null
}
POST Returns all the Greeks details for the specified option identifier
{{baseUrl}}/factset-options/v1/greeks
BODY json

{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "priceType": "",
  "calendar": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/factset-options/v1/greeks");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\",\n  \"calendar\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/factset-options/v1/greeks" {:content-type :json
                                                                      :form-params {:ids []
                                                                                    :startDate ""
                                                                                    :endDate ""
                                                                                    :frequency ""
                                                                                    :priceType ""
                                                                                    :calendar ""}})
require "http/client"

url = "{{baseUrl}}/factset-options/v1/greeks"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\",\n  \"calendar\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/factset-options/v1/greeks"),
    Content = new StringContent("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\",\n  \"calendar\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/factset-options/v1/greeks");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\",\n  \"calendar\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/factset-options/v1/greeks"

	payload := strings.NewReader("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\",\n  \"calendar\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/factset-options/v1/greeks HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 107

{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "priceType": "",
  "calendar": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/factset-options/v1/greeks")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\",\n  \"calendar\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/factset-options/v1/greeks"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\",\n  \"calendar\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\",\n  \"calendar\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/greeks")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/factset-options/v1/greeks")
  .header("content-type", "application/json")
  .body("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\",\n  \"calendar\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  ids: [],
  startDate: '',
  endDate: '',
  frequency: '',
  priceType: '',
  calendar: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/factset-options/v1/greeks');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/greeks',
  headers: {'content-type': 'application/json'},
  data: {
    ids: [],
    startDate: '',
    endDate: '',
    frequency: '',
    priceType: '',
    calendar: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/factset-options/v1/greeks';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":[],"startDate":"","endDate":"","frequency":"","priceType":"","calendar":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/factset-options/v1/greeks',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "ids": [],\n  "startDate": "",\n  "endDate": "",\n  "frequency": "",\n  "priceType": "",\n  "calendar": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\",\n  \"calendar\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/greeks")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/factset-options/v1/greeks',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  ids: [],
  startDate: '',
  endDate: '',
  frequency: '',
  priceType: '',
  calendar: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/greeks',
  headers: {'content-type': 'application/json'},
  body: {
    ids: [],
    startDate: '',
    endDate: '',
    frequency: '',
    priceType: '',
    calendar: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/factset-options/v1/greeks');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  ids: [],
  startDate: '',
  endDate: '',
  frequency: '',
  priceType: '',
  calendar: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/greeks',
  headers: {'content-type': 'application/json'},
  data: {
    ids: [],
    startDate: '',
    endDate: '',
    frequency: '',
    priceType: '',
    calendar: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/factset-options/v1/greeks';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":[],"startDate":"","endDate":"","frequency":"","priceType":"","calendar":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ids": @[  ],
                              @"startDate": @"",
                              @"endDate": @"",
                              @"frequency": @"",
                              @"priceType": @"",
                              @"calendar": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/factset-options/v1/greeks"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/factset-options/v1/greeks" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\",\n  \"calendar\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/factset-options/v1/greeks",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'ids' => [
        
    ],
    'startDate' => '',
    'endDate' => '',
    'frequency' => '',
    'priceType' => '',
    'calendar' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/factset-options/v1/greeks', [
  'body' => '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "priceType": "",
  "calendar": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/factset-options/v1/greeks');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'ids' => [
    
  ],
  'startDate' => '',
  'endDate' => '',
  'frequency' => '',
  'priceType' => '',
  'calendar' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'ids' => [
    
  ],
  'startDate' => '',
  'endDate' => '',
  'frequency' => '',
  'priceType' => '',
  'calendar' => ''
]));
$request->setRequestUrl('{{baseUrl}}/factset-options/v1/greeks');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/factset-options/v1/greeks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "priceType": "",
  "calendar": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/factset-options/v1/greeks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "priceType": "",
  "calendar": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\",\n  \"calendar\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/factset-options/v1/greeks", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/factset-options/v1/greeks"

payload = {
    "ids": [],
    "startDate": "",
    "endDate": "",
    "frequency": "",
    "priceType": "",
    "calendar": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/factset-options/v1/greeks"

payload <- "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\",\n  \"calendar\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/factset-options/v1/greeks")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\",\n  \"calendar\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/factset-options/v1/greeks') do |req|
  req.body = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\",\n  \"calendar\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/factset-options/v1/greeks";

    let payload = json!({
        "ids": (),
        "startDate": "",
        "endDate": "",
        "frequency": "",
        "priceType": "",
        "calendar": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/factset-options/v1/greeks \
  --header 'content-type: application/json' \
  --data '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "priceType": "",
  "calendar": ""
}'
echo '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "priceType": "",
  "calendar": ""
}' |  \
  http POST {{baseUrl}}/factset-options/v1/greeks \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "ids": [],\n  "startDate": "",\n  "endDate": "",\n  "frequency": "",\n  "priceType": "",\n  "calendar": ""\n}' \
  --output-document \
  - {{baseUrl}}/factset-options/v1/greeks
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "priceType": "",
  "calendar": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/factset-options/v1/greeks")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "date": "2021-05-07T00:00:00.000+0000",
      "requestId": "TSLA.US#C00LP",
      "fsymId": "TSLA.US#C00LP",
      "delta": 0.973638814832741,
      "rho": 0.094465131548418,
      "theta": 0.473699140972176,
      "gamma": 0.0000276813921231278,
      "vega": 0.246816993561083
    },
    {
      "date": "2021-05-07T00:00:00.000+0000",
      "requestId": "TSLA.US#C00LP",
      "fsymId": "TSLA.US#C00LP",
      "delta": 0.973638814832741,
      "rho": 0.094465131548418,
      "theta": 0.473699140972176,
      "gamma": 0.0000276813921231278,
      "vega": 0.246816993561083
    }
  ]
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The date parameter 'startDate' must be in the following date format: YYYY-MM-DD",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:48:42.016Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The parameter 'ids' is required and may not be empty.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:52:48.091Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The use of future dates is not applicable in this endpoint. Please revise your request to include dates up to today's current date.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:58:54.068Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Invalid Parameter (s): fakeParameterName1 fakeParameterName2. Please modify your request to use parameters outlined in the specification for this endpoint.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Malformed JSON Request",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-04T16:18:38.949Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The request took too long. Try again with a smaller request.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "User Authentication Failed",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "User Authentication Failed.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Forbidden",
  "timestamp": "2020-06-12T16:08:51.731Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "USERNAME-SERIAL does not have permission to use /factset-funds /v1/{endpoint}",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Unsupported Media Type",
  "timestamp": "2019-11-05T09:42:27.237Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "text/html media type is not supported. Supported media types are application/json",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Error writing JSON output",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-01T10:36:01.944Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Unexpected error",
  "subErrors": null
}
POST Returns the at-the-money (ATM) implied volatility details for the specified underlying security identifier
{{baseUrl}}/factset-options/v1/atm-implied-volatility
BODY json

{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": "",
  "period": 0
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/factset-options/v1/atm-implied-volatility");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"period\": 0\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/factset-options/v1/atm-implied-volatility" {:content-type :json
                                                                                      :form-params {:ids []
                                                                                                    :startDate ""
                                                                                                    :endDate ""
                                                                                                    :frequency ""
                                                                                                    :exchange ""
                                                                                                    :period 0}})
require "http/client"

url = "{{baseUrl}}/factset-options/v1/atm-implied-volatility"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"period\": 0\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/factset-options/v1/atm-implied-volatility"),
    Content = new StringContent("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"period\": 0\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/factset-options/v1/atm-implied-volatility");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"period\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/factset-options/v1/atm-implied-volatility"

	payload := strings.NewReader("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"period\": 0\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/factset-options/v1/atm-implied-volatility HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 103

{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": "",
  "period": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/factset-options/v1/atm-implied-volatility")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"period\": 0\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/factset-options/v1/atm-implied-volatility"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"period\": 0\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"period\": 0\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/atm-implied-volatility")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/factset-options/v1/atm-implied-volatility")
  .header("content-type", "application/json")
  .body("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"period\": 0\n}")
  .asString();
const data = JSON.stringify({
  ids: [],
  startDate: '',
  endDate: '',
  frequency: '',
  exchange: '',
  period: 0
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/factset-options/v1/atm-implied-volatility');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/atm-implied-volatility',
  headers: {'content-type': 'application/json'},
  data: {ids: [], startDate: '', endDate: '', frequency: '', exchange: '', period: 0}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/factset-options/v1/atm-implied-volatility';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":[],"startDate":"","endDate":"","frequency":"","exchange":"","period":0}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/factset-options/v1/atm-implied-volatility',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "ids": [],\n  "startDate": "",\n  "endDate": "",\n  "frequency": "",\n  "exchange": "",\n  "period": 0\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"period\": 0\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/atm-implied-volatility")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/factset-options/v1/atm-implied-volatility',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ids: [], startDate: '', endDate: '', frequency: '', exchange: '', period: 0}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/atm-implied-volatility',
  headers: {'content-type': 'application/json'},
  body: {ids: [], startDate: '', endDate: '', frequency: '', exchange: '', period: 0},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/factset-options/v1/atm-implied-volatility');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  ids: [],
  startDate: '',
  endDate: '',
  frequency: '',
  exchange: '',
  period: 0
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/atm-implied-volatility',
  headers: {'content-type': 'application/json'},
  data: {ids: [], startDate: '', endDate: '', frequency: '', exchange: '', period: 0}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/factset-options/v1/atm-implied-volatility';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":[],"startDate":"","endDate":"","frequency":"","exchange":"","period":0}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ids": @[  ],
                              @"startDate": @"",
                              @"endDate": @"",
                              @"frequency": @"",
                              @"exchange": @"",
                              @"period": @0 };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/factset-options/v1/atm-implied-volatility"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/factset-options/v1/atm-implied-volatility" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"period\": 0\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/factset-options/v1/atm-implied-volatility",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'ids' => [
        
    ],
    'startDate' => '',
    'endDate' => '',
    'frequency' => '',
    'exchange' => '',
    'period' => 0
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/factset-options/v1/atm-implied-volatility', [
  'body' => '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": "",
  "period": 0
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/factset-options/v1/atm-implied-volatility');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'ids' => [
    
  ],
  'startDate' => '',
  'endDate' => '',
  'frequency' => '',
  'exchange' => '',
  'period' => 0
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'ids' => [
    
  ],
  'startDate' => '',
  'endDate' => '',
  'frequency' => '',
  'exchange' => '',
  'period' => 0
]));
$request->setRequestUrl('{{baseUrl}}/factset-options/v1/atm-implied-volatility');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/factset-options/v1/atm-implied-volatility' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": "",
  "period": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/factset-options/v1/atm-implied-volatility' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": "",
  "period": 0
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"period\": 0\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/factset-options/v1/atm-implied-volatility", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/factset-options/v1/atm-implied-volatility"

payload = {
    "ids": [],
    "startDate": "",
    "endDate": "",
    "frequency": "",
    "exchange": "",
    "period": 0
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/factset-options/v1/atm-implied-volatility"

payload <- "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"period\": 0\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/factset-options/v1/atm-implied-volatility")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"period\": 0\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/factset-options/v1/atm-implied-volatility') do |req|
  req.body = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"exchange\": \"\",\n  \"period\": 0\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/factset-options/v1/atm-implied-volatility";

    let payload = json!({
        "ids": (),
        "startDate": "",
        "endDate": "",
        "frequency": "",
        "exchange": "",
        "period": 0
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/factset-options/v1/atm-implied-volatility \
  --header 'content-type: application/json' \
  --data '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": "",
  "period": 0
}'
echo '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": "",
  "period": 0
}' |  \
  http POST {{baseUrl}}/factset-options/v1/atm-implied-volatility \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "ids": [],\n  "startDate": "",\n  "endDate": "",\n  "frequency": "",\n  "exchange": "",\n  "period": 0\n}' \
  --output-document \
  - {{baseUrl}}/factset-options/v1/atm-implied-volatility
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "exchange": "",
  "period": 0
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/factset-options/v1/atm-implied-volatility")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "date": "2021-05-14T00:00:00.000+0000",
      "period": "1",
      "aTMImplVolMarket": 58.579093,
      "putATMImplVol": 58.015339,
      "requestId": "TSLA",
      "callATMImplVol": 58.015339,
      "callATMImplVolMarket": 58.791874,
      "fsymId": "WWDPYB-S",
      "exchange": "USA",
      "putATMImplVolMarket": 58.810684,
      "aTMImplVol": 58.015339
    },
    {
      "date": "2021-05-14T00:00:00.000+0000",
      "period": "1",
      "aTMImplVolMarket": 58.579093,
      "putATMImplVol": 58.015339,
      "requestId": "TSLA",
      "callATMImplVol": 58.015339,
      "callATMImplVolMarket": 58.791874,
      "fsymId": "WWDPYB-S",
      "exchange": "USA",
      "putATMImplVolMarket": 58.810684,
      "aTMImplVol": 58.015339
    }
  ]
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The date parameter 'startDate' must be in the following date format: YYYY-MM-DD",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:48:42.016Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The parameter 'ids' is required and may not be empty.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:52:48.091Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The use of future dates is not applicable in this endpoint. Please revise your request to include dates up to today's current date.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:58:54.068Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Invalid Parameter (s): fakeParameterName1 fakeParameterName2. Please modify your request to use parameters outlined in the specification for this endpoint.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Malformed JSON Request",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-04T16:18:38.949Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The request took too long. Try again with a smaller request.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "User Authentication Failed",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "User Authentication Failed.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Forbidden",
  "timestamp": "2020-06-12T16:08:51.731Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "USERNAME-SERIAL does not have permission to use /factset-funds /v1/{endpoint}",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Unsupported Media Type",
  "timestamp": "2019-11-05T09:42:27.237Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "text/html media type is not supported. Supported media types are application/json",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Error writing JSON output",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-01T10:36:01.944Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Unexpected error",
  "subErrors": null
}
POST Returns the implied volatility information for the specified option identifier
{{baseUrl}}/factset-options/v1/implied-volatility
BODY json

{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "priceType": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/factset-options/v1/implied-volatility");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/factset-options/v1/implied-volatility" {:content-type :json
                                                                                  :form-params {:ids []
                                                                                                :startDate ""
                                                                                                :endDate ""
                                                                                                :frequency ""
                                                                                                :priceType ""}})
require "http/client"

url = "{{baseUrl}}/factset-options/v1/implied-volatility"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/factset-options/v1/implied-volatility"),
    Content = new StringContent("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/factset-options/v1/implied-volatility");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/factset-options/v1/implied-volatility"

	payload := strings.NewReader("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/factset-options/v1/implied-volatility HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 89

{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "priceType": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/factset-options/v1/implied-volatility")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/factset-options/v1/implied-volatility"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/implied-volatility")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/factset-options/v1/implied-volatility")
  .header("content-type", "application/json")
  .body("{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  ids: [],
  startDate: '',
  endDate: '',
  frequency: '',
  priceType: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/factset-options/v1/implied-volatility');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/implied-volatility',
  headers: {'content-type': 'application/json'},
  data: {ids: [], startDate: '', endDate: '', frequency: '', priceType: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/factset-options/v1/implied-volatility';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":[],"startDate":"","endDate":"","frequency":"","priceType":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/factset-options/v1/implied-volatility',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "ids": [],\n  "startDate": "",\n  "endDate": "",\n  "frequency": "",\n  "priceType": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/implied-volatility")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/factset-options/v1/implied-volatility',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ids: [], startDate: '', endDate: '', frequency: '', priceType: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/implied-volatility',
  headers: {'content-type': 'application/json'},
  body: {ids: [], startDate: '', endDate: '', frequency: '', priceType: ''},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/factset-options/v1/implied-volatility');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  ids: [],
  startDate: '',
  endDate: '',
  frequency: '',
  priceType: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/implied-volatility',
  headers: {'content-type': 'application/json'},
  data: {ids: [], startDate: '', endDate: '', frequency: '', priceType: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/factset-options/v1/implied-volatility';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":[],"startDate":"","endDate":"","frequency":"","priceType":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ids": @[  ],
                              @"startDate": @"",
                              @"endDate": @"",
                              @"frequency": @"",
                              @"priceType": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/factset-options/v1/implied-volatility"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/factset-options/v1/implied-volatility" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/factset-options/v1/implied-volatility",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'ids' => [
        
    ],
    'startDate' => '',
    'endDate' => '',
    'frequency' => '',
    'priceType' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/factset-options/v1/implied-volatility', [
  'body' => '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "priceType": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/factset-options/v1/implied-volatility');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'ids' => [
    
  ],
  'startDate' => '',
  'endDate' => '',
  'frequency' => '',
  'priceType' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'ids' => [
    
  ],
  'startDate' => '',
  'endDate' => '',
  'frequency' => '',
  'priceType' => ''
]));
$request->setRequestUrl('{{baseUrl}}/factset-options/v1/implied-volatility');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/factset-options/v1/implied-volatility' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "priceType": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/factset-options/v1/implied-volatility' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "priceType": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/factset-options/v1/implied-volatility", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/factset-options/v1/implied-volatility"

payload = {
    "ids": [],
    "startDate": "",
    "endDate": "",
    "frequency": "",
    "priceType": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/factset-options/v1/implied-volatility"

payload <- "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/factset-options/v1/implied-volatility")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/factset-options/v1/implied-volatility') do |req|
  req.body = "{\n  \"ids\": [],\n  \"startDate\": \"\",\n  \"endDate\": \"\",\n  \"frequency\": \"\",\n  \"priceType\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/factset-options/v1/implied-volatility";

    let payload = json!({
        "ids": (),
        "startDate": "",
        "endDate": "",
        "frequency": "",
        "priceType": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/factset-options/v1/implied-volatility \
  --header 'content-type: application/json' \
  --data '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "priceType": ""
}'
echo '{
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "priceType": ""
}' |  \
  http POST {{baseUrl}}/factset-options/v1/implied-volatility \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "ids": [],\n  "startDate": "",\n  "endDate": "",\n  "frequency": "",\n  "priceType": ""\n}' \
  --output-document \
  - {{baseUrl}}/factset-options/v1/implied-volatility
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "ids": [],
  "startDate": "",
  "endDate": "",
  "frequency": "",
  "priceType": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/factset-options/v1/implied-volatility")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "date": "2021-05-07T00:00:00.000+0000",
      "requestId": "TSLA.US#CD33M-USA",
      "fsymId": "TSLA.US#CD33M",
      "impliedVolatility": 61.744664
    },
    {
      "date": "2021-05-07T00:00:00.000+0000",
      "requestId": "TSLA.US#CD33M-USA",
      "fsymId": "TSLA.US#CD33M",
      "impliedVolatility": 61.744664
    }
  ]
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The date parameter 'startDate' must be in the following date format: YYYY-MM-DD",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:48:42.016Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The parameter 'ids' is required and may not be empty.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:52:48.091Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The use of future dates is not applicable in this endpoint. Please revise your request to include dates up to today's current date.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:58:54.068Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Invalid Parameter (s): fakeParameterName1 fakeParameterName2. Please modify your request to use parameters outlined in the specification for this endpoint.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Malformed JSON Request",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-04T16:18:38.949Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The request took too long. Try again with a smaller request.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "User Authentication Failed",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "User Authentication Failed.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Forbidden",
  "timestamp": "2020-06-12T16:08:51.731Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "USERNAME-SERIAL does not have permission to use /factset-funds /v1/{endpoint}",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Unsupported Media Type",
  "timestamp": "2019-11-05T09:42:27.237Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "text/html media type is not supported. Supported media types are application/json",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Error writing JSON output",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-01T10:36:01.944Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Unexpected error",
  "subErrors": null
}
POST Returns all the profile information for the list of identifiers as of a specific date
{{baseUrl}}/factset-options/v1/snapshot
BODY json

{
  "ids": [],
  "date": "",
  "currency": "",
  "calendar": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/factset-options/v1/snapshot");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"ids\": [],\n  \"date\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/factset-options/v1/snapshot" {:content-type :json
                                                                        :form-params {:ids []
                                                                                      :date ""
                                                                                      :currency ""
                                                                                      :calendar ""}})
require "http/client"

url = "{{baseUrl}}/factset-options/v1/snapshot"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"ids\": [],\n  \"date\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/factset-options/v1/snapshot"),
    Content = new StringContent("{\n  \"ids\": [],\n  \"date\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/factset-options/v1/snapshot");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"ids\": [],\n  \"date\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/factset-options/v1/snapshot"

	payload := strings.NewReader("{\n  \"ids\": [],\n  \"date\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/factset-options/v1/snapshot HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 65

{
  "ids": [],
  "date": "",
  "currency": "",
  "calendar": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/factset-options/v1/snapshot")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"ids\": [],\n  \"date\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/factset-options/v1/snapshot"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"ids\": [],\n  \"date\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"ids\": [],\n  \"date\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/snapshot")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/factset-options/v1/snapshot")
  .header("content-type", "application/json")
  .body("{\n  \"ids\": [],\n  \"date\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  ids: [],
  date: '',
  currency: '',
  calendar: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/factset-options/v1/snapshot');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/snapshot',
  headers: {'content-type': 'application/json'},
  data: {ids: [], date: '', currency: '', calendar: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/factset-options/v1/snapshot';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":[],"date":"","currency":"","calendar":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/factset-options/v1/snapshot',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "ids": [],\n  "date": "",\n  "currency": "",\n  "calendar": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"ids\": [],\n  \"date\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/factset-options/v1/snapshot")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/factset-options/v1/snapshot',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ids: [], date: '', currency: '', calendar: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/snapshot',
  headers: {'content-type': 'application/json'},
  body: {ids: [], date: '', currency: '', calendar: ''},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/factset-options/v1/snapshot');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  ids: [],
  date: '',
  currency: '',
  calendar: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/factset-options/v1/snapshot',
  headers: {'content-type': 'application/json'},
  data: {ids: [], date: '', currency: '', calendar: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/factset-options/v1/snapshot';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"ids":[],"date":"","currency":"","calendar":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ids": @[  ],
                              @"date": @"",
                              @"currency": @"",
                              @"calendar": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/factset-options/v1/snapshot"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/factset-options/v1/snapshot" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"ids\": [],\n  \"date\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/factset-options/v1/snapshot",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'ids' => [
        
    ],
    'date' => '',
    'currency' => '',
    'calendar' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/factset-options/v1/snapshot', [
  'body' => '{
  "ids": [],
  "date": "",
  "currency": "",
  "calendar": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/factset-options/v1/snapshot');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'ids' => [
    
  ],
  'date' => '',
  'currency' => '',
  'calendar' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'ids' => [
    
  ],
  'date' => '',
  'currency' => '',
  'calendar' => ''
]));
$request->setRequestUrl('{{baseUrl}}/factset-options/v1/snapshot');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/factset-options/v1/snapshot' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": [],
  "date": "",
  "currency": "",
  "calendar": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/factset-options/v1/snapshot' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "ids": [],
  "date": "",
  "currency": "",
  "calendar": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"ids\": [],\n  \"date\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/factset-options/v1/snapshot", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/factset-options/v1/snapshot"

payload = {
    "ids": [],
    "date": "",
    "currency": "",
    "calendar": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/factset-options/v1/snapshot"

payload <- "{\n  \"ids\": [],\n  \"date\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/factset-options/v1/snapshot")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"ids\": [],\n  \"date\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/factset-options/v1/snapshot') do |req|
  req.body = "{\n  \"ids\": [],\n  \"date\": \"\",\n  \"currency\": \"\",\n  \"calendar\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/factset-options/v1/snapshot";

    let payload = json!({
        "ids": (),
        "date": "",
        "currency": "",
        "calendar": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/factset-options/v1/snapshot \
  --header 'content-type: application/json' \
  --data '{
  "ids": [],
  "date": "",
  "currency": "",
  "calendar": ""
}'
echo '{
  "ids": [],
  "date": "",
  "currency": "",
  "calendar": ""
}' |  \
  http POST {{baseUrl}}/factset-options/v1/snapshot \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "ids": [],\n  "date": "",\n  "currency": "",\n  "calendar": ""\n}' \
  --output-document \
  - {{baseUrl}}/factset-options/v1/snapshot
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "ids": [],
  "date": "",
  "currency": "",
  "calendar": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/factset-options/v1/snapshot")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "data": [
    {
      "date": "2021-04-13T00:00:00.000+0000",
      "underlyingPrice": 762.32,
      "openInterest": 92,
      "underlyingFsymSecurityId": "WWDPYB-S",
      "fsymId": "TSLA.US#CD33M-USA",
      "delta": 0.77158491,
      "type": 1,
      "impliedVolatility": 66.226879,
      "price": 247.425,
      "requestId": "TSLA.US#CD33M-USA",
      "name": "Tesla Inc Call DEC21 590.00",
      "style": 0,
      "expirationDate": "2021-12-17T00:00:00.000+0000"
    },
    {
      "date": "2021-04-13T00:00:00.000+0000",
      "underlyingPrice": 762.32,
      "openInterest": 92,
      "underlyingFsymSecurityId": "WWDPYB-S",
      "fsymId": "TSLA.US#CD33M-USA",
      "delta": 0.77158491,
      "type": 1,
      "impliedVolatility": 66.226879,
      "price": 247.425,
      "requestId": "TSLA.US#CD33M-USA",
      "name": "Tesla Inc Call DEC21 590.00",
      "style": 0,
      "expirationDate": "2021-12-17T00:00:00.000+0000"
    }
  ]
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The date parameter 'startDate' must be in the following date format: YYYY-MM-DD",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:48:42.016Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The parameter 'ids' is required and may not be empty.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:52:48.091Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The use of future dates is not applicable in this endpoint. Please revise your request to include dates up to today's current date.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2020-06-12T15:58:54.068Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Invalid Parameter (s): fakeParameterName1 fakeParameterName2. Please modify your request to use parameters outlined in the specification for this endpoint.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Malformed JSON Request",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Bad Request",
  "timestamp": "2019-11-04T16:18:38.949Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "The request took too long. Try again with a smaller request.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "User Authentication Failed",
  "timestamp": "2019-10-31T16:08:07.945Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "User Authentication Failed.",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Forbidden",
  "timestamp": "2020-06-12T16:08:51.731Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "USERNAME-SERIAL does not have permission to use /factset-funds /v1/{endpoint}",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Unsupported Media Type",
  "timestamp": "2019-11-05T09:42:27.237Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "text/html media type is not supported. Supported media types are application/json",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-05T09:48:29.180Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Error writing JSON output",
  "subErrors": null
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "status": "Internal Server Error",
  "timestamp": "2019-11-01T10:36:01.944Z",
  "path": "/factset-options/v1/{endpoint}",
  "message": "Unexpected error",
  "subErrors": null
}