How can I place a Future order but I can't pass leverage and margin type params? - api

I am developing a trading tool and I need to automate placing future orders on Binance.
I find the API to place Future order: POST /fapi/v1/order
This is the parameters list from the Binance document:
Link here: https://developers.binance.com/docs/binance-trading-api/futures#signed-endpoint-examples-for-post-fapiv1order
But I can't see where is the leverage (x5, x8, x10,...) or margin type (ISOLATED/CROSS) param to pass?
Anyone help me clarify the workflow to integrate API to place order?
Many thanks!

Related

Mapbox Optimization V2

I'm testing the new api for VRP solutions, does anyone found the answer when it can't find the solution for the problem?, there's a ref message but no way to get the descripcion of the problem point. I think it might be a point that breaks the algorithm, anyone some idea?
{"code":"no_solution","message":"No solution found","ref":"xxxxxxxxxxxxxxxxxxxxxxx"}
Already sent the problem document to the api described here: https://docs.mapbox.com/api/navigation/optimization/#optimization-v2-api-errors
Also about the vehicles can we command it to respect the order sent?, also there are 2 params extra optional which are really important, the loading_policy and the objective min-schedule-completion-time, it says there's an error in the data but there's no doc for the format in json

How to pass variable value to feature title in karate summary report?

I wrote a feature and a reusable feature, and this is the result in karate summary report below.
enter image description here
However, I want to pass variable value to the report sub-title and makes it more readable. Below is what I want to get.
enter image description here
Is there any way we can customize the report in this way?
I have read the question on passing variable to karate feature line and scenario name. However it doesnt work on reusable feature, because for reusable feature it wont show as a normal scenario in karate report....
Thanks a lots!
Yes, in Karate we recommend that re-use is done only for "utilities" and not the main domain flows in your test.
Do consider using a Scenario Outline to loop like this, because it will appear in the report as a "normal" Scenario.
An enhancement released in 1.3.0.RC2 may give you what you are looking for: https://github.com/karatelabs/karate/issues/1905
Else please assume this is not supported, but open-source code contributions are welcome.

Scenario Outline And Examples in karate [duplicate]

This question already has an answer here:
In Karate Scenario Outline test, how to pass param values in the Examples table through a variable
(1 answer)
Closed 1 year ago.
I want to run my scenario with all the images that i have in my resource folder. meaning every time hitting same api with different image(converting them to base64encoding first) .But as this images already are in resource folder than it does not make sense to save with some name or records in csv for scenario outline purpose. Can i call a my own function (having code to take the image from resource folder and convert it into base64) in Examples section , So that for every image it will hits the same api again.
Yes. First write some java code to get a list of the image files. You can refer this code for ideas: https://stackoverflow.com/a/65035825/143475
If that is too hard, then just create a CSV file with a list of paths. Let me say that Karate is designed for testing, but you seem to be expecting something else. Karate is not a "general purpose" programming language. But it can be made to do extreme things by Java interop.
One you have a JSON array, then it can be used as the data-source for the Examples: section: https://github.com/intuit/karate#json-array-data-source
You can refer other answers for Base64 conversion: https://stackoverflow.com/a/46452864/143475
All the things you want to do is possible, but please do some research and try. And the next time you ask a question, please show what you tried and give examples instead of just a broad question, thanks.

Creating Cytoscape.js extensions

Max, I want to update my extension to the new format, but I am running into issues with placement of custom code. It seems that the extension framework has been updated a lot since I added an extension 4 years ago. Is there a way to get better documentation on getting started with adding a extension? I am happy to help write up the documentation if you can help answer some questions that I think would help get people started. Let me know.
The only thing that really changed is that the scaffolder creates a webpack project for you. The extension registering procedure is the same: http://js.cytoscape.org/#extensions/api
For example, cytoscape( 'collection', 'fooBar', function(){ return 'baz'; } ) registers eles.fooBar().
I guess the main thing is that there are a lot more files than what the previous scaffolder generated, so it might be harder to find things. The layout output has lots of files, because it creates a skeleton impl for each of the continuous case and the discrete case.
The scaffolder isn't strictly necessary. You could use another build system (or none at all) as long as you call cytoscape(). For example, if you only care about publishing to npm for people who use webpack/browserify/rollup, then you could just use cjs require('cytoscape') to pull in the peer dependency. Exporting a register function is nice if you want to allow the client to decide the order of extension registrations with cytoscape.use(extension) (or extension(cytoscape)).
You're right that there should be some more docs on the output of the scaffolder. Maybe a summary of the files would suffice. We could add a tutorial in the blog later if need be. Both the docs and the blog just use markdown, so the content could go in either place.

displaying sortable table for a custom query in an AdminTab instance

I recently had to deal with a custom module written for prestashop 1.4, I have to display the
results in a std prestashop table (sortable, with filters) like the one for displaying orders
for example. I find that the official doc realy lacks a complete example for this case.
Any suggestion on how to proceed ?
The best way to use list in your module controller is to use HelperList class and is generateList function.
See blockreinsurance for sample
Best regards.