Skip to content

Authorization Headers are not supported #701

@bennycode

Description

@bennycode

I am trying to use api to make request to Alpaca. The Readme.io demo page shows me that I can add Authorization Headers for the API Key & API Secret. When I follow the example, my code crashes with the following message:

Error: Sorry, this operation currently requires multiple forms of authentication which this library doesn't yet support.

Here is the example:

import api from 'api';
const sdk = api('@testalpacadocs/v1#zryj16ll4d1dl0');

sdk.auth(process.env.API_KEY);
sdk.auth(process.env.API_SECRET);

await sdk.postOrder({side: 'buy', type: 'market', time_in_force: 'day'});

Screenshot

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions