module Bitfinex::Funding
Public Instance Methods
funding_cancel_all_offers(currency = "USD")
click to toggle source
docs.bitfinex.com/reference#rest-auth-cancel-all-funding-offers
# File lib/bitfinex/api/funding.rb, line 37 def funding_cancel_all_offers(currency = "USD") res = request("auth/w/funding/offer/cancel/all", { currency: currency, }).body return JSON.parse(res) end
funding_cancel_offer(id)
click to toggle source
取消指定掛單 docs.bitfinex.com/reference#rest-auth-cancel-order
# File lib/bitfinex/api/funding.rb, line 29 def funding_cancel_offer(id) res = request("auth/w/funding/offer/cancel", { id: id, }).body return JSON.parse(res) end
funding_create_offer(currency, amount, rate, period)
click to toggle source
掛單 docs.bitfinex.com/reference#submit-funding-offer
# File lib/bitfinex/api/funding.rb, line 46 def funding_create_offer(currency, amount, rate, period) # auth/w/funding/offer/submit request("auth/w/funding/offer/submit", { type: "LIMIT", symbol: currency, #fUSD amount: amount, #借款要是負的 rate: rate, period: period, flags: 0, }).body end
funding_credit(currency = "fUSD")
click to toggle source
# File lib/bitfinex/api/funding.rb, line 73 def funding_credit(currency = "fUSD") res = request("auth/r/funding/credits/#{currency}").body return JSON.parse(res) end
funding_credit_all()
click to toggle source
所有正在借款列表 Ratelimit: 45 req/min docs.bitfinex.com/reference#rest-auth-funding-credits
# File lib/bitfinex/api/funding.rb, line 68 def funding_credit_all res = request("auth/r/funding/credits").body return JSON.parse(res) end
funding_info(currency = "fUSD")
click to toggle source
列出放貸總績效 Ratelimit: 45 req/min docs.bitfinex.com/reference#rest-auth-info-funding
# File lib/bitfinex/api/funding.rb, line 6 def funding_info(currency = "fUSD") res = request("auth/r/info/funding/#{currency}").body return JSON.parse(res) end
funding_loans(currency = "fUSD")
click to toggle source
# File lib/bitfinex/api/funding.rb, line 78 def funding_loans(currency = "fUSD") res = request("auth/r/funding/loans/#{currency}").body return JSON.parse(res) end
funding_new_offer(params)
click to toggle source
docs.bitfinex.com/v1/reference#rest-auth-offers
# File lib/bitfinex/api/funding.rb, line 59 def funding_new_offer(params) res = v1_request("offer/new", params) res = JSON.parse(res) return res end
funding_offers(currency = "fUSD")
click to toggle source
列出currency掛單 Ratelimit: 45 req/min docs.bitfinex.com/reference#rest-auth-funding-offers
# File lib/bitfinex/api/funding.rb, line 22 def funding_offers(currency = "fUSD") res = request("auth/r/funding/offers/#{currency}").body return JSON.parse(res) end
funding_offers_all()
click to toggle source
列出所有正在掛單 Ratelimit: 45 req/min docs.bitfinex.com/reference#rest-auth-funding-offers
# File lib/bitfinex/api/funding.rb, line 14 def funding_offers_all res = request("auth/r/funding/offers").body return JSON.parse(res) end