Module: MaxExchangeApi::Helper
- Defined in:
- lib/max_exchange_api/helper.rb
Class Method Summary collapse
Class Method Details
.gen_headers(payload, access_key, secret_key) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/max_exchange_api/helper.rb', line 6 def gen_headers(payload, access_key, secret_key) encoded_payload = encode(payload) return { 'X-MAX-ACCESSKEY' => access_key, 'X-MAX-PAYLOAD' => encoded_payload, 'X-MAX-SIGNATURE' => encrypt(encoded_payload, secret_key), } end |