/fixedfloat-api

The FixedFloat API allows you to automate the receipt of information about the exchange rates of currencies, created orders, presented on the FixedFloat service, create orders and manage them using it

Primary LanguageJavaScriptMIT LicenseMIT

FixedFloat API - Javascript


FixedFloat API - Javascript (unofficial)
Get API Key | Docs | Website | FAQ

Description

The FixedFloat API allows you to automate the receipt of information about the exchange rates of currencies, created orders, presented on the FixedFloat service, create orders and manage them using it

API Documentation: https://fixedfloat.com/api

Get your API KEY: https://fixedfloat.com/?ref=a7u3rzvc

Installation

Method 1 :

git clone https://github.com/andyvonde/fixedfloat-api.git
npm install

Method 2 :

Download the folder, extract and run :

npm install

Usage

const FixedFloat = require("./FixedFloat.js");
let fixedfloat_api = new FixedFloat("API_KEY", "SECRET_KEY");

Methods

Method Description
.getCurrencies() Get list of all currencies
.getPrice(fromCurrency, toCurrency, fromQty, toQty, type) Informations about a currency pair
.getOrder(id, token) informations about an order
.setEmergency(id, token, choice, address) Emergency action choice
.createOrder(fromCurrency, toCurrency, toAddress, fromQty, toQty, type, extra) Create exchange order

.getCurrencies()

Getting a list of all currencies that are available on FixedFloat.com

Official documentation

let response = fixedfloat_api.getCurrencies();

.getPrice(fromCurrency, toCurrency, fromQty, toQty, type)

Information about a currency pair with a set amount of funds.

Official documentation

// Fixed
response = fixedfloat_api.getPrice("USDCBSC", "BTC", 25.0, (type = "fixed"));

// Float
response = fixedfloat_api.getPrice("USDCBSC", "BTC", 25.0);

.getOrder(id, token)

Receiving information about the order.

Official documentation

response = fixedfloat_api.getOrder("ID", "TOKEN");

.setEmergency(id, token, choice, address)

Emergency action choice.

Official documentation

// Exchange
response = fixedfloat_api.setEmergency("ID", "TOKEN", "EXCHANGE");

// Refund
response = fixedfloat_api.setEmergency("ID", "TOKEN", "REFUND", "ADDRESS");

.createOrder(fromCurrency, toCurrency, toAddress, fromQty, toQty, type, extra)

Creating exchange order.

Official documentation

// Fixed
response = fixedfloat_api.createOrder(
  "USDCBSC",
  "BTC",
  "ADDRESS",
  25.0,
  (type = "fixed")
);

// Float
response = fixedfloat_api.createOrder("USDCBSC", "BTC", "ADDRESS", 25.0);

Example

const API_KEY = "YOUR_API_KEY_HERE";
const SECRET_KEY = "YOUR_SECRET_KEY_HERE";

const FixedFloat = require("./FixedFloat.js");
let fixedfloat_api = new FixedFloat(API_KEY, SECRET_KEY);

let allCurrencies = fixedfloat_api.getCurrencies();
console.log("All currencies :", allCurrencies);

let ethBtcPrice = fixedfloat_api.getPrice("ETH", "BTC", "0.001", "0.001");
console.log("Eth/Btc Price :", ethBtcPrice);

let order = fixedfloat_api.getOrder("ID", "TOKEN");
console.log("Order :", order);

let fixedOrderCreated = fixedfloat_api.createOrder(
  "USDCBSC",
  "BTC",
  "ADDRESS",
  25.0,
  (type = "fixed")
);

console.log("Order created :", fixedOrderCreated);

let FloatOrderCreated = fixedfloat_api.createOrder(
  "USDCBSC",
  "BTC",
  "ADDRESS",
  25.0
);

console.log("Order created :", FloatOrderCreated);

License

fixedfloat_api is Licensed under the MIT License