module Bitopro::Order
Public Instance Methods
cancel_order(pair: "", order_id: "")
click to toggle source
Example: client = Bitopro::Client.new
client.cancel_order(pair: “bito_eth”, order_id: “3135725012”)
# File lib/bitopro/api/order.rb, line 21 def cancel_order(pair: "", order_id: "") authenticated_delete("/orders/#{pair}/#{order_id}") end
create_order(pair: "", action: "", amount: "0", price: "0", type: "limit")
click to toggle source
Example: client = Bitopro::Client.new
client.create_order(pair: “bito_eth”, action: “buy”, amount: “600”, price: “0.000001”, type: “limit”)
# File lib/bitopro/api/order.rb, line 8 def create_order(pair: "", action: "", amount: "0", price: "0", type: "limit") raise Error, "Amount or Price must be string" if !amount.is_a?(String) || !price.is_a?(String) authenticated_post("/orders/#{pair}", { body: { action: action, amount: amount, price: price, timestamp: timestamp, type: type }}) end
get_order(pair: "", order_id: "")
click to toggle source
# File lib/bitopro/api/order.rb, line 25 def get_order(pair: "", order_id: "") authenticated_get("/orders/#{pair}/#{order_id}") end