How to close binance future position for all open orders via api - binance

I am unable to close the open positions like BINANCE future interface did. Can anyone guide me that I am right path. Currently I am try to close the positions using create orders api with below parameters. I have 2 sale orders in open positions and I want close them. I trying to implement same behavior as BINANCE future close all position did.
Binance.futures_create_order(symbol=self.symbol, side=‘BUY’, type=‘Limit’,closePosition=true)

Related

What is the Web Service Endpoint for the 'Close Financial Periods' screen (AP506000)?

What is the Web Service Endpoint for the 'Close Financial Periods' screen (AP506000)? I can't seem to find it (or anything similar) in the list of endpoints. I need to select the oldest open period from the list of periods displayed on that screen.
Also - what's the best way to determine the name of the endpoint for a given screen, other than just looking for a similar name as the screen itself in the list of endpoints?
Thanks...
For the oldest open period, I would create a generic inquiry for the PX.Objects.GL.FinPeriods.MasterFinPeriod table. You can see ClosedInAP, ClosedInAr, etc. From there, you could make a filter to show only open periods, sorted ascending. Once you have it worked out, you could expose it to odata, or even extend your web service endpoint to get the data out.
Here is an example of periods that are not closed in AP, but closed in AR (and unclosed).

I want sialog flow to start the intent, the user to answer and dialog flow to reply again

I'm trying to build a bot simulating an aviation test. Google simulates the pilot and the user is the ATC controller.
Usually a dialog works like this in aviation:
Pilot(google): Tower, AmericanAirlines runway vacated, request taxi instructions to stand tango 10.
ATC(user): Roger, taxi via alpha and bravo to stand tango 10.
Pilot(google): via alpha and bravo to stand tango 10, AmericanAirlines.
It will be a series of different small snippet dialogs like this kind of telling the story of the planes flightpath (landing clearance, runway vacated, ...) So i thought I make an intent for each. In the Text response I could put the text from the last dialog and then straight away the next text, where the user has to answer to. But this would not simulate reality, where there is a time gap between the two (landing clearance and vacating runway for example).
I tried to setup webhook and then trigger the next by setfollowupevent. But then the text is skipped.
function welcome(agent) {
agent.add(`Welcome to my agent!`);
agent.setFollowupEvent('next_event');
}
e.g. like this.
Any idea how I could solve this? it is not really a dialog bot because the first response comes from the bot, followed by the test question from the user and then acknowledged by the bot again.
Any help is appreciated cause I can't really find anything in the doc.
Thanks.

Revit API - How to check for open Transactions, Sub-transactions, or Group Transactions

I'm working on a button where I have a project document open and a family document open. I'm trying to close the family document however I'm getting an error saying:
Autodesk.Revit.Exceptions.InvalidOperationException: 'Close is not allowed when there is any open sub-transaction, transaction, or transaction group.'
I've checked all of my transactions and they are all started and committed using transactionName.Start(document) and transactionName.Commit()
does anyone know of a way to check for any ongoing active transactions?
I have also tried using
'RevitCommandId closeDoc = RevitCommandId.LookupPostableCommandId(PostableCommand.Close);
uiapp.PostCommand(closeDoc);'
however that tends to only want to close my project document.
///////////////////////////////////UPDATE/////////////////////////////
soooo I just found out I didn't need to use uiapp.OpenAndActivateDocument(). I didn't know you could edit a family without opening the document. That solves my problem. I'm still curious if there's a way to check for open transactions though.
Yes there is a way to check for open Transactions and its quite helpful in making flexible helper-functions. The Document object has an IsModifiable property - essentially if a Transaction is open, then this will be True.
I use it like this:
autoTransaction = False
if not document.IsModifiable:
t = Transaction(document, 'New Transaction cause no transaction was open')
t.Start()
autoTransaction = True
# go ahead and modify the database
if autoTransaction:
t.Commit()
Its served me well so far, hope this helps!
Afaik, the Revit API does not enable you to check from outside whether a transaction is started. You need access to the Transaction object itself to check its status. If you did not create it yourself, you have no access to it.
How did you open the two documents?
What Revit commands did you execute in them?

How to show list of products in google assistant without selecting any of them?

Currently i am building a chatbot where i need to display list of products with its description. I tried Carousel, Browsable Carousel and List but they all allow to select any options from the list.
I want to display the products but do not allow to select any of them.
I am using dialogflow as NLP and sending fulfillment using action-on-google's dialogflow node.js library.
Can anyone help me implementing this ?
You can try sending a single Basic Card with an image, if that is suitable for the response. You can also look into using a Table Card, however it doesn't allow for images in the cells - just a single image for the table.
There is no way to prevent a List or Carousel item from being selected, but you can certainly handle the response by ignoring what they've selected and re-prompting them with whatever you've prompted them with after showing the carousel/list. (Or even just re-showing the list and re-prompting them.)
However, it really isn't clear why the items are for information only and that speaking them isn't intended to continue the conversation. Would it make sense that, if a user selected one, you might provide additional information that can be useful? What would a user expect?

How to let flutter apps support TV device?

TV device does not support touch operation, users have to use Remote Control. We need to move focus by press left, top, right, bottom direction key, and when the target widget get focus, we will press OK button to response kinds of key event. But I cannot find any flutter interface to solve this interaction, anyone who can help me?
There are SystemChannels for this.
I haven't tried it myself, but it looks like this should do what you need:
DartDocs - SystemChannels.keyEvent
A JSON BasicMessageChannel for keyboard events.
[DartDocs - SystemChannels.textInput[(https://www.dartdocs.org/documentation/flutter/0.0.41-dev/services/SystemChannels/textInput-constant.html)
A JSON MethodChannel for handling text input.
This channel exposes a system text input control for interacting with
IMEs (input method editors, for example on-screen keyboards). There is
one control, and at any time it can have one active transaction.
Transactions are represented by an integer. New Transactions are
started by TextInput.setClient. Messages that are sent are assumed to
be for the current transaction (the last "client" set by
TextInput.setClient). Messages received from the shell side specify
the transaction to which they apply, so that stale messages
referencing past transactions can be ignored.
The later is used in https://github.com/flutter/flutter/blob/4389f07024a4c69f7223401abd4d0ab3ecc45698/packages/flutter/lib/src/services/text_input.dart
There are known issues with physical keyboards thought that might cause this use case not to work
https://github.com/flutter/flutter/issues/11177
https://github.com/flutter/flutter/issues/7943
https://github.com/flutter/flutter/issues/9347
Yep,Flutter doesn't support D-pad navigation yet.But,I have an Android Smart TV and if I connect a Bluetooth mouse,I am able to navigate,swipes,click,etc my Flutter app on the TV.

Resources