Git Product home page Git Product logo

tradeogrepy's Introduction

TradeOgre Python API Wrapper

Preconditions

In order to use this API wrapper you need to have API keys from TradeOgre.

Open Account --> Settings --> API Keys

Load API keys

From file

from tradeogre import TradeOgre

trade_ogre = TradeOgre().load_key('TradeOgre.key')

In this case the key must be on the first line and the secret must be on the second line

As direct input in class

from tradeogre import TradeOgre

trade_ogre = TradeOgre(key=some_key, secret=some_secret)

As direct input in method

from tradeogre import TradeOgre

trade_ogre = TradeOgre()
reply = trade_ogre.balances(key=some_key, secret=some_secret)

Example usage

Markets

Retrieve a listing of all markets

trade_ogre.markets()

Order book

Retrieve the current order book for a market

trade_ogre.order_book('BTC-XMR')

Ticker

Retrieve the ticker (current price) for a market

trade_ogre.ticker('BTC-XMR')

History

Retrieve the history of the last trades for a market

trade_ogre.history('BTC-XTL')

Balance

Get the balance of a specific currency
You need to provide API key and secret for this method

trade_ogre.balance('BTC')

Balances

Retrieve all balances for your account
You need to provide API key and secret for this method

trade_ogre.balance()

Buy

Submit a buy order to the order book for a market
You need to provide API key and secret for this method

trade_ogre.buy('BTC-XMR', '10', '0.0123')  # market, quantity, price

Sell

Submit a sell order to the order book for a market
You need to provide API key and secret for this method

trade_ogre.sell('BTC-XMR', '10', '0.0123')  # market, quantity, price

Orders

Retrieve the active orders for your account
You need to provide API key and secret for this method

trade_ogre.orders('BTC-XMR')

Order

Retrieve information about a specific order
You need to provide API key and secret for this method

trade_ogre.order('1702a7bc-6a18-92c0-c1fe-aaf581d2352d')

Cancel

Cancel an order on the order book
You need to provide API key and secret for this method

trade_ogre.cancel('a40ac710-8dc5-b5a8-aa69-389715197b14')

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.