Skip to content

Instantly share code, notes, and snippets.

View agustinf's full-sized avatar

Agustin Feuerhake agustinf

View GitHub Profile
require 'JSON'
require 'httpparty'
HOST = 'https://www.buda.com'
def new_order(symbol, amount, type, side, price = nil)
side = side == :buy ? 'Bid' : 'Ask'
payload = { order: { type: side, price_type: type.to_s,
limit: price.to_s, amount: amount.to_s } }
path = "/api/v2/markets/#{symbol}/orders"