keys
b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291
keys
b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291
keys
{
"id": 828680665,
"clientOrderId": "f4307c6e507e49019907c917b6d7a084",
"symbol": "ETHBTC",
"side": "sell",
"status": "partiallyFilled",
"type": "limit",
"timeInForce": "GTC",
"quantity": "13.942",
"price": "0.011384",
"cumQuantity": "5.240",
"createdAt": "2017-01-16T14:18:47.321Z",
"updatedAt": "2017-01-19T15:23:54.876Z",
"postOnly": false
}
keys
import requests
session = requests.session()
session.auth = ("publicKey", "secretKey")
b = session.get('https://api.hitbtc.com/api/2/order').json()
print(b)
keys
import requests
session = requests.session()
session.auth = ("publicKey", "secretKey")
keys
import requests
session = requests.session()
session.auth = ("publicKey", "secretKey")
orderData = {'symbol':'ethbtc', 'side': 'sell', 'quantity': '0.063', 'price': '0.046016' }
r = session.post('https://api.hitbtc.com/api/2/order', data = orderData)
print(r.json())
keys
import requests
session = requests.session()
session.auth = ("publicKey", "secretKey")
b = session.get('https://api.hitbtc.com/api/2/trading/balance').json()
print(b)
keys
curl -X GET -u "publicKey:secretKey" \
"https://api.hitbtc.com/api/2/order/c1837634ef81472a9cd13c81e7b91401"
keys
const fetch = require('node-fetch');
const credentials = Buffer.from('publicKey' + ':' + 'secretKey').toString('base64');
fetch('https://api.hitbtc.com/api/2/trading/balance', {
method: 'GET',
headers: {
'Authorization': 'Basic ' + credentials
}
});
keys
import React from 'react';
import { useForm } from "react-hook-form";
import { yupResolver } from '@hookform/resolvers';
import * as Yup from 'yup';
function App() {
// form validation rules
const validationSchema = Yup.object().shape({
numberOfTickets: Yup.string()
.required('Number of tickets is required'),
tickets: Yup.array().of(
Yup.object().shape({
name: Yup.string()
.required('Name is required'),
email: Yup.string()
.email('Email is Invalid')
.required('Email is required')
})
)
});
// functions to build form returned by useForm() hook
const { register, handleSubmit, reset, errors, watch } = useForm({
resolver: yupResolver(validationSchema)
});
// watch to enable re-render when ticket number is changed
const watchNumberOfTickets = watch('numberOfTickets');
// return array of ticket indexes for rendering dynamic forms in the template
function ticketNumbers() {
return [...Array(parseInt(watchNumberOfTickets || 1)).keys()];
}
function onSubmit(data) {
// display form data on success
alert('SUCCESS!! :-)\n\n' + JSON.stringify(data, null, 4));
}
return (
<form onSubmit={handleSubmit(onSubmit)} onReset={reset}>
<div className="card m-3">
<h5 className="card-header">React Dynamic Form Example with React Hook Form</h5>
<div className="card-body border-bottom">
<div className="form-row">
<div className="form-group">
<label>Number of Tickets</label>
<select name="numberOfTickets" ref={register} className={`form-control ${errors.numberOfTickets ? 'is-invalid' : ''}`}>
{['',1,2,3,4,5,6,7,8,9,10].map(i =>
<option key={i} value={i}>{i}</option>
)}
</select>
<div className="invalid-feedback">{errors.numberOfTickets?.message}</div>
</div>
</div>
</div>
{ticketNumbers().map(i => (
<div key={i} className="list-group list-group-flush">
<div className="list-group-item">
<h5 className="card-title">Ticket {i + 1}</h5>
<div className="form-row">
<div className="form-group col-6">
<label>Name</label>
<input name={`tickets[${i}]name`} ref={register} type="text" className={`form-control ${errors.tickets?.[i]?.name ? 'is-invalid' : '' }`} />
<div className="invalid-feedback">{errors.tickets?.[i]?.name?.message}</div>
</div>
<div className="form-group col-6">
<label>Email</label>
<input name={`tickets[${i}]email`} ref={register} type="text" className={`form-control ${errors.tickets?.[i]?.email ? 'is-invalid' : '' }`} />
<div className="invalid-feedback">{errors.tickets?.[i]?.email?.message}</div>
</div>
</div>
</div>
</div>
))}
<div className="card-footer text-center border-top-0">
<button type="submit" className="btn btn-primary mr-1">
Buy Tickets
</button>
<button className="btn btn-secondary mr-1" type="reset">Reset</button>
</div>
</div>
</form>
)
}
export { App };
keys
curl -X GET -u "publicKey:secretKey" \
"https://api.hitbtc.com/api/2/trading/fee/ETHBTC"
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us