All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.jacobpeterson.alpaca.rest.AlpacaRequest Maven / Gradle / Ivy

There is a newer version: 9.2.0
Show newest version
package net.jacobpeterson.alpaca.rest;

import net.jacobpeterson.abstracts.rest.AbstractRequest;
import net.jacobpeterson.alpaca.properties.AlpacaProperties;

/**
 * The Class AlpacaRequest.
 */
public class AlpacaRequest extends AbstractRequest {

    /** The Constant USER_AGENT_KEY. */
    private static final String USER_AGENT_KEY = "user-agent";

    /** The Constant API_KEY_ID. */
    private static final String API_KEY_ID = "APCA-API-KEY-ID";

    /** The Constant API_SECRET_KEY. */
    private static final String API_SECRET_KEY = "APCA-API-SECRET-KEY";

    /**
     * Instantiates a new alpaca request.
     *
     * @param keyID     the key id
     * @param secretKey the secret key
     */
    public AlpacaRequest(String keyID, String secretKey) {
        super();

        headers.put(USER_AGENT_KEY, AlpacaProperties.USER_AGENT_VALUE);
        headers.put(API_KEY_ID, keyID);
        headers.put(API_SECRET_KEY, secretKey);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy