Class: Cryptoexchange::Exchanges::Coinut::Services::Pairs
Constant Summary
Services::Pairs::HTTP_METHOD, Services::Pairs::MARKET, Services::Pairs::PAIRS_URL, Services::Pairs::POST_PARAMS
Instance Method Summary
collapse
#default_override_exist?, #default_override_path, #exchange_class, #fetch_via_api, #fetch_via_api_using_post, #fetch_via_override, #http_get, #http_post, #user_override_exist?, #user_override_path
Instance Method Details
#adapt(output) ⇒ Object
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/cryptoexchange/exchanges/coinut/services/pairs.rb', line 27
def adapt(output)
output["SPOT"].map do |pairs, array|
hash = array.first
Cryptoexchange::Models::MarketPair.new(
base: hash["base"],
target: hash["quote"],
inst_id: hash["inst_id"].to_s,
market: Coinut::Market::NAME
)
end
end
|
#payload ⇒ Object
19
20
21
|
# File 'lib/cryptoexchange/exchanges/coinut/services/pairs.rb', line 19
def payload
'{"nonce":' + SecureRandom.random_number(99999).to_s + ',"request":"inst_list", "sec_type":"SPOT"}'
end
|