Having trouble with ByBit By/Sell API. ColdFusion any help appreciated.
https://bybit-exchange.github.io/docs/spot/v3/?console#t-authenticationparameters
Authentication for POST
POST
rule: timestamp + api_key + recv_window + raw_request_body
param_str =
"1659073093578T0d98KyVamQ62YBzN85000{
"symbol": "BTCUSDT",
"orderQty":"0.05",
"side": "Sell",
"orderType": "LIMITT",
"timeInForce": "GTC",
"orderPrice": "24500",
"orderLinkId": "spotA0008"
}"
curl --location --request POST 'https://api-testnet.bybit.com/spot/v3/private/order' \
--header 'X-BAPI-API-KEY: {api key}'
--header 'X-BAPI-TIMESTAMP: 1659067662307'
--header 'X-BAPI-RECV-WINDOW: 5000'
--header 'X-BAPI-SIGN: cc63fb44be4a87f4b7bbd42db012ddacc1c935c3d3ae3e01c3b4be393522c213'
--header 'Content-Type: application/json'
--data-raw '{
"symbol": "BTCUSDT",
"orderQty":"0.01",
"side": "Buy",
"orderType": "LIMIT",
"timeInForce": "GTC",
"orderPrice": "21300",
"orderLinkId": "spotx006",
"orderCategory": 1,
"triggerPrice": "21700"
}'
This is the Post Example.
For Account - my signature works fine.
<cfscript>
apiKey = "#_key#";
apiSecret = "#_s#";
newbody = serializeJSON({
"symbol": "#symb#",
"orderQty":"#qty#",
"side": "#side#",
"orderType": "#type#"
});
ts_key_str = #unixdatetimeNow.getTime()# & '#apikey#' & '5000';
str_to_sign = #unixdatetimeNow.getTime()# & '#apikey#' & '5000' & '#newbody#';
HMAC = hmac(str_to_sign, apiSecret, "HMACSHA256");
</cfscript>
<cfhttp url="#base_api##req_path#" method="POST" result="result" charset="utf-8">
<cfhttpparam type="body" value="#newbody#">
<cfhttpparam type="HEADER" name="Content_Type" value="application/json">
<cfhttpparam type="header" name="X-BAPI-SIGN-TYPE" value="2">
<cfhttpparam type="header" name="X-BAPI-API-KEY" value="#_key#">
<cfhttpparam type="header" name="X-BAPI-RECV-WINDOW" value="5000">
<cfhttpparam type="header" name="X-BAPI-SIGN" value="#lhmac#">
<cfhttpparam type="header" name="X-BAPI-TIMESTAMP" value="#unixdatetimeNow.getTime()#">
</cfhttp>
Even adding the ts_key_str in front of new body does not work either.
I get bad signature. When getting account data I using this it works fine cfhttpparam type="body" value=""
Any help appreciated.
It was a timestamp issue.
Set one timestamp, and use that timestamp. So it doesn't maybe pull different timestamp on a delayed call.
Updated code.
<!--- MARKET --->
<cfset b_body = '{"symbol": "#pair#","orderQty":"#size#","side": "#side#","orderType": "MARKET"}'>
<cfset unixdatetimeNow = dateConvert( "local2Utc", now() )>
<cfset timestamp = #unixdatetimeNow.getTime()#>
<cfscript>
apiKey = "#_key#";
apiSecret = "#_s#";
str_to_sign = #timestamp# & '#apikey#' & '5000' & '#b_body#';
HMAC = hmac(str_to_sign, apiSecret, "HMACSHA256");
</cfscript>
<cfset lhmac = lCase(#hmac#)>
<cfhttp url="#base_api##req_path#" method="POST" result="result" charset="utf-8">
<cfhttpparam type="body" value="#b_body#">
<cfhttpparam type="header" name="X-BAPI-SIGN-TYPE" value="2">
<cfhttpparam type="header" name="X-BAPI-SIGN" value="#lhmac#">
<cfhttpparam type="header" name="X-BAPI-API-KEY" value="#_key#">
<cfhttpparam type="header" name="X-BAPI-TIMESTAMP" value="#timestamp#">
<cfhttpparam type="header" name="X-BAPI-RECV-WINDOW" value="5000">
<cfhttpparam type="HEADER" name="Content_Type" value="application/json">
</cfhttp>
This is similar to the code that i have
<component
type="example" />
but i want to use it like this
<component
type="{{ $t('common.forms.search') }}" />
problem is that its not working
You bind properties in Vue like this:
<component :type="$t('common.forms.search')" />
or verbose:
<component v-bind:type="$t('common.forms.search')" />
See https://v2.vuejs.org/v2/guide/syntax.html#Attributes
I try to change the defaut icon of y outlook add-in. By defaut it's blue icon
I changed every logo in my images folder. When I would like add my add-in I see the correct logo
But on Outlook, I have again the old logo []
3
I tried to clean and rebuild the solution, but it didn't change anything. I don't understand why I have always the old logo. I don't know where this old logo come from
Try to add in your manifest file this:
<IconUrl DefaultValue="your URL to image"/>
<HighResolutionIconUrl DefaultValue="your URL to image" />
The image have to be 128x128 .
If you have compose and read tags you need also have this:
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="80" resid="icon80" />
</Icon>
When icon16,icon32,icon80 is inside the source tag:
<Resources>
<bt:Images>
<bt:Image id="icon16" DefaultValue="your URL to image"/>
</bt:Images>
</Resources>
You can see full example and explanation here:
https://learn.microsoft.com/en-us/outlook/add-ins/manifests
Tried to select autocomplete textbox , i'm getting an exception.
WebElement autoOptions = driver.findElement(By.id("form:mat_input"));
autoOptions.sendKeys("b");
html snap :-
<p:autoComplete id="mat" required="true"
value="#{vCreateSupplyRequest._RequestMaterial}"
completeMethod="#{vCreateSupplyRequest.getMaterials}"
var="item" itemLabel="#{item.materialName}" itemValue="#{item}"
converter="materialConverter" forceSelection="true">
<p:ajax event="itemSelect"
listener="#{vCreateSupplyRequest.onMaterialSelection}"
update="mainGrid,mainGrid1" />
<p:column headerText="Material">
<h:outputText value="#{item.materialName}" />
</p:column>
<p:column headerText="Category">
<h:outputText value="#{item.materialCategory.categoryName}" />
</p:column>
</p:autoComplete>
Is it possible to show a pdf file in modalpopup with icefaces. Tried this but does not seem to work. Am new to icefaces too.
<ice:panelPopup autoCentre="true" visible="#{popup.visible}" modal="true">
<f:facet name="header"/>
<f:facet name="body">
<OBJECT DATA="/ICEfacesDevelopersGuide.pdf" TYPE="application/pdf" WIDTH="100%" HEIGHT="100%" />
<ice:commandButton value="Close" action="#{popup.close}" />
</f:facet>
</ice:panelPopup>
I ended up doing it the old way opening it on a new window or tab using output link and target attribute.