Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API endpoint for currencies #1433

Merged
merged 9 commits into from Jul 19, 2018
Merged

Add API endpoint for currencies #1433

merged 9 commits into from Jul 19, 2018

Conversation

shal
Copy link

@shal shal commented Jul 17, 2018

No description provided.

optional :type, type: String, values: %w[fiat coin], desc: 'Type of currency. Available values: coin, fiat'
end
get '/currencies' do
if params[:type].nil?
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

params[:type].blank?


expose :base_factor, documentation: 'Currency base factor'
expose :precision, documentation: 'Currency precision'
end
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expose only:
id, symbol, type, deposit_fee, withdraw_fee, quick_withdraw_limit, deposit_confirmations, allow_multiple_deposit_addresses, base_factor, precision

@@ -67,10 +66,67 @@

after { KlineDB.redis.flushall }

RSpec::Matchers.define :have_trade_structure do
match { |x| not (x.dig(:price).nil? || x.dig(:volume).nil? || x.dig(:change).nil?) }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

match { |x| x[:price].present? && x[:volume].present? && x[:change].present? }

@ysv
Copy link

ysv commented Jul 18, 2018

Please update doc https://github.com/rubykube/peatio/blob/master/docs/api/member_api_v2.md

@shal
Copy link
Author

shal commented Jul 18, 2018

@ysv
Copy link

ysv commented Jul 18, 2018

@shal I don't think we run bump in master

@shal
Copy link
Author

shal commented Jul 18, 2018

@ysv
Copy link

ysv commented Jul 18, 2018

@shal
Copy link
Author

shal commented Jul 18, 2018

@ysv you won 😄

@shal
Copy link
Author

shal commented Jul 18, 2018

@ysv I updated member API documentation according to this patch.

@ysv ysv added the v1.9 label Jul 18, 2018
@shal
Copy link
Author

shal commented Jul 19, 2018

@ysv Ready.

@ysv
Copy link

ysv commented Jul 19, 2018

@shal looks good for me

@shal
Copy link
Author

shal commented Jul 19, 2018

@ysv Please, push this PR into wb1 branch to test it.

@mod mod merged commit 39e90d2 into openware:master Jul 19, 2018
ymasiuk pushed a commit to ymasiuk/peatio that referenced this pull request Jul 20, 2018
* Add API endpoint for currencies

* Prettify code for currency/trades endpoint

* Prettify tests for currency/trades endpoint

* Finish

* Fix spec

* Add one more spec of currency structure

* Fix typo

* Add documentation about added currency API

* Fix
mod pushed a commit that referenced this pull request Jul 20, 2018
* Add API endpoint for currencies (#1433)
* Add one more spec of currency structure
* Add documentation about added currency API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants