Comments (2)
You simply need to provide a negative value for amount
:
Excerpt from bitfinex-api-py/bfxapi/websockets/order_manager.py:89
async def submit_order(self, symbol, price, amount, market_type=Order.Type.LIMIT,
hidden=False, price_trailing=None, price_aux_limit=None,
oco_stop_price=None, close=False, reduce_only=False,
post_only=False, oco=False, time_in_force=None,
onConfirm=None, onClose=None, gid=None, *args, **kwargs):
"""
Submit a new order
@param gid: assign the order to a group identitfier
@param symbol: the name of the symbol i.e 'tBTCUSD
@param price: the price you want to buy/sell at (must be positive)
@param amount: order size: how much you want to buy/sell,
a negative amount indicates a sell order and positive a buy order
@param market_type Order.Type: please see Order.Type enum
amount decimal string Positive for buy, Negative for sell
Also, the fourth parameter is market_type
as in the type of the order: market, limit, Immediate-or-Cancel, etc. These are enumerated in bitfinex-api-py/bfxapi/models/order.py
.
So for your example this is what you're looking for: await bfx.ws.submit_order('tBTCUSD', 10944, -0.01, Order.Type.EXCHANGE_MARKET)
.
Tested with my account and it works just fine, I would suggest closing the issue, unless this does not address it sufficiently. Let me know.
from bitfinex-api-py.
Thanks @lucasege, this is missing from the documentation.
from bitfinex-api-py.
Related Issues (20)
- ws_capacity not workingx HOT 10
- How to get funding earnings? HOT 6
- Data not matching (BTCUSD) HOT 3
- Error running subscribe_trades_candles.py example. HOT 4
- misleading documentation HOT 1
- 'Fatal error on SSL protocol' when use uvloop
- API is missing candle data HOT 4
- Rest API missing Liquidations implementation HOT 2
- Python 3.10 Support HOT 2
- bitfinex-api-py/bfxapi/rest/ public stats data HOT 2
- Unable to create order on paper account: [ERROR] Notification ERROR: action: disabled HOT 1
- Not working with python3.10 asyncio HOT 2
- Unknown data event: '[0.79816, 0, 1]' [54, [0.79816, 0, 1]] HOT 1
- How to get more data in public orderbook? HOT 1
- New pyee version
- Candle data from wss is delayed behind rest HOT 1
- bfx.rest.auth.cancel_order_multi HOT 1
- Failing "import bfxapi" HOT 2
- How come I can't call this endpoint: get_derivatives_status_history
- Starting from version 3.0.0b3, the meta parameter is no longer present in the submit_order function. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitfinex-api-py.