Giter Club home page Giter Club logo

exchange-connectors's Introduction

Exchange Connectors

This module shall support the emergence of perfect markets by simplifying market access etc.

This module is used a.o. by the Volatility Farming Project.

Volatility Farming exploits unnecessary (manipulation induced) volatility and supports the emergence of a reasonable (fundamentals based) price stability - especially when it is done via DAOs with huge capital pools - open to people - supporting layer 0 :)

Contributions are welcome - please raise issues or PRs to share improvement proposals or contact us via our english-, russian- and german speaking Telegram Group.

Centralized Exchanges (CEXes)

Bybit General Interaction

See also the Bybit Example Client and Bybit Connector for more usage examples.

import { IExchangeConnector } from "https://deno.land/x/exchange_connectors/mod-bybit.ts"
import { BybitConnector } from "https://deno.land/x/exchange_connectors/mod-bybit.ts"

export class ExampleClient {

    private exchangeConnector: IExchangeConnector

    public constructor(private apiKey: string, private apiSecret: string) {
        this.exchangeConnector = new BybitConnector(apiKey, apiSecret)
    }

    public async showUsageExamples(): Promise<void> {
        const accountInfo = await this.exchangeConnector.getFuturesAccountData()
        console.log(accountInfo)
        const positions = await this.exchangeConnector.getPositions()
        console.log(positions)
    }
}

const apiKey = Deno.args[0]
const apiSecret = Deno.args[1]

const exampleClient = new ExampleClient(apiKey, apiSecret)

await exampleClient.showUsageExamples()

Bybit Usage Example: Volatility Farming

Via Deno (need to keep the terminal open)

deno run --unstable --allow-net https://deno.land/x/exchange_connectors/src/volatility-farming/volatility-farmer/start-volatility-farmer.ts <yourByBitAPIKey> <yourByBitAPISecret> <yourMongoDBUser> <yourMongoDBPassword> InvestmentAdvisorBTCLongShortExtreme BybitConnector MongoService

Via PM2 (in the background)

git clone https://github.com/distributed-ledger-technology/exchange-connectors.git  
cd exchange-connectors  
pm2 start -n "volatility-farming" --interpreter="deno" --interpreter-args="run --unstable --allow-net" ./src/volatility-farming/volatility-farmer/start-volatility-farmer.ts -- <yourByBitAPIKey> <yourByBitAPISecret> <yourMongoDBUser> <yourMongoDBPassword> InvestmentAdvisorBTCLongShortExtreme BybitConnector MongoService 

Explore it in action: https://openforce.de/

Decentralized Exchanges (DEXes)

Under Construction
Shall we use the web3 deno module (is web3 ready for deno?)?

Uniswap

FYX

https://yfx.io

exchange-connectors's People

Contributors

michael-spengler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

patpatwithhat

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.