Chilkat Examples

ChilkatHOME.NET Core C#Android™AutoItCC#C++Chilkat2-PythonCkPythonClassic ASPDataFlexDelphi ActiveXDelphi DLLGoJavaLianjaMono C#Node.jsObjective-CPHP ActiveXPHP ExtensionPerlPowerBuilderPowerShellPureBasicRubySQL ServerSwift 2Swift 3,4,5...TclUnicode CUnicode C++VB.NETVBScriptVisual Basic 6.0Visual FoxProXojo Plugin

Xojo Plugin Web API Examples

Primary Categories

ABN AMRO
AWS Secrets Manager
AWS Security Token Service
AWS Translate
Activix CRM
Adyen
Alibaba Cloud OSS
Amazon Cognito
Amazon DynamoDB
Amazon MWS
Amazon Pay
Amazon Rekognition
Amazon SP-API
Amazon Voice ID
Aruba Fatturazione
Azure Maps
Azure Monitor
Azure OAuth2
Azure Storage Accounts
Backblaze S3
Banco Inter
Belgian eHealth Platform
Bitfinex v2 REST
Bluzone
BrickLink
Bunny CDN
CallRail
CardConnect
Cerved
ClickBank
Clickatell
Cloudfare
Constant Contact
DocuSign
Duo Auth MFA
ETrade
Ecwid
Egypt ITIDA
Egypt eReceipt
Etsy
Facebook
Faire
Frame.io
GeoOp
GetHarvest
Global Payments
Google People
Google Search Console
Google Translate
Hungary NAV Invoicing
IBM Text to Speech
Ibanity
IntakeQ
Jira
Lightspeed
MYOB
Magento
Mailgun
Mastercard

MedTunnel
MercadoLibre
MessageMedia
Microsoft Calendar
Microsoft Group
Microsoft Tasks and Plans
Microsoft Teams
Moody's
Okta OAuth/OIDC
OneLogin OIDC
OneNote
OpenAI ChatGPT
PRODA
PayPal
Paynow.pl
Peoplevox
Populi
QuickBooks
Rabobank
Refinitiv
Royal Mail OBA
SCiS Schools Catalogue
SII Chile
SMSAPI
SOAP finkok.com
SendGrid
Shippo
Shopify
Shopware
Shopware 6
SimpleTexting
Square
Stripe
SugarCRM
TicketBAI
Trello
Twilio
Twitter API v2
Twitter v1
UPS
UniPin
VoiceBase
Vonage
WaTrend
Walmart v3
Wasabi
WhatsApp
WiX
WooCommerce
WordPress
Xero
Yahoo Mail
Yapily
Yousign
ZATCA
Zendesk
Zoom
_Miscellaneous_
eBay
effectconnect
hacienda.go.cr

 

 

 

(Xojo Plugin) Bitfinex v2 REST Submit Order

Submit an order.

For more information, see https://docs.bitfinex.com/reference#rest-auth-submit-order

Chilkat Xojo Plugin Download

Xojo Plugin for Windows, Linux, Mac OS X, and ARM, ARM64

// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

Dim http As New Chilkat.Http
Dim success As Boolean

Dim crypt As New Chilkat.Crypt2

Dim apiPath As String
apiPath = "v2/auth/w/order/submit"
Dim apiKey As String
apiKey = "MY_API_KEY"
Dim apiSecret As String
apiSecret = "MY_API_SECRET"

Dim dt As New Chilkat.CkDateTime
success = dt.SetFromCurrentSystemTime()

Dim sbNonce As New Chilkat.StringBuilder
success = sbNonce.Append(dt.GetAsUnixTimeStr(False))
success = sbNonce.Append("000")
Dim nonce As String
nonce = sbNonce.GetAsString()

Dim json As New Chilkat.JsonObject
success = json.UpdateString("type","LIMIT")
success = json.UpdateString("symbol","tBTCUSD")
success = json.UpdateString("price","15")
success = json.UpdateString("amount","0.001")
success = json.UpdateInt("flags",0)
Dim body As String
body = json.Emit()

Dim sbSignature As New Chilkat.StringBuilder
success = sbSignature.Append("/api/")
success = sbSignature.Append(apiPath)
success = sbSignature.Append(nonce)
success = sbSignature.Append(body)

crypt.EncodingMode = "hex_lower"
crypt.HashAlgorithm = "sha384"
crypt.MacAlgorithm = "hmac"
success = crypt.SetMacKeyString(apiSecret)

Dim sig As String
sig = crypt.MacStringENC(sbSignature.GetAsString())

http.SetRequestHeader "bfx-apikey",apiKey
http.SetRequestHeader "bfx-signature",sig
http.SetRequestHeader "bfx-nonce",nonce

Dim resp As Chilkat.HttpResponse
resp = http.PostJson2("https://api.bitfinex.com/v2/auth/w/order/submit","application/json",body)
If (http.LastMethodSuccess = False) Then
    System.DebugLog(http.LastErrorText)
    Return
End If

System.DebugLog("Response body:")
System.DebugLog(resp.BodyStr)


 

© 2000-2024 Chilkat Software, Inc. All Rights Reserved.