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

Integrate v2 endpoints #502

Merged

Conversation

JacobPlaster
Copy link
Contributor

@JacobPlaster JacobPlaster commented Oct 1, 2019

Description:

Adds new V2 endpoints to the lib:

 `/v2/auth/w/order/submit` (same data used in sending orders through WS, `on`)
  `/v2/auth/w/order/update`  (same data used in sending orders through WS, `ou`)
  `/v2/auth/w/order/cancel` (same data used in sending orders through WS, `oc`)
  `/v2/auth/w/order/multi`  (same data used in sending orders through WS `ox_multi`, but inside an array called `ops`, ie. `{"ops": [["on", {"symbol": "tBTCUSD", "amount": "5", "type": "LIMIT", "price": "10"}]]}`)
  `/v2/auth/w/order/cancel/multi` (same data used in sending orders through WS, `oc`)
  `/v2/auth/w/position/claim` (params: `id`)
  `/v2/auth/w/funding/offer/submit` (same data used in sending orders through WS, `on`)
  `/v2/auth/w/funding/offer/cancel` (same data used in sending orders through WS, `on`)
  `/v2/auth/w/funding/close` (params: `id`, `type` (credit|loan))
  `/v2/auth/w/funding/auto` (params: `status` (1|0), `currency`, `amount`, `rate`, `period`) (`rate === 0` means `FRR`)
  `/v2/auth/w/transfer` (params: `from`, `to`, `currency`, `currency_to`, `amount`)
  `/v2/auth/w/deposit/address` (params: `wallet`, `method`, `op_renew`(=1 to regenerate the wallet address))
  `/v2/auth/w/withdraw` (params: `wallet`, `method`, `amount`, `address

Breaking changes:

Originally the lib forwarded any calls to rest2.withdraw and rest2.transfer to the v1 endpoint but since the v2 endpoints for these actions require different params then anyone using the old param style will encounter an error. To solve this I have bumped the major version of the lib

  • legacy V1 routing (see above)

New features:

  • rest2.withdraw
  • rest2.getDepositAddress
  • rest2.transfer
  • rest2.submitAutoFunding
  • rest2.closeFunding
  • rest2.cancelFundingOffer
  • rest2.submitFundingOffer
  • rest2.claimPosition
  • rest2.cancelOrder
  • rest2.updateOrder
  • rest2.submitOrder

Fixes:

None

PR status:

  • Version bumped
  • Change-log updated

Copy link
Contributor

@f3rno f3rno left a comment

Choose a reason for hiding this comment

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

lgtm 👍

@JacobPlaster JacobPlaster merged commit eca73aa into bitfinexcom:master Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants